开发者

jQuery - and operators

I have the following code

jQuery(".opsection input").live('change', function(){

What i want to also do is add开发者_StackOverflow an 'or' operator so that it runs on a 'change' function also when someone 'clicks' a text field

Any help would be grand.


you do it like this

jQuery(".opsection input").live('change click', function(){

This will run the function on either a change or click event.

jQuery - and operators


Try this:

jQuery(".opsection input").live('change click', function(){

Check this link for more information: http://api.jquery.com/live/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜