开发者

jQuery - and operators

开发者 https://www.devze.com 2023-02-24 00:27 出处:网络
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 als

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

精彩评论

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