views:

19

answers:

2

I have a page where all inputs are assigned a behavior: $("input").blur(function () {

and I need to exclude a checkbox that has a specific id:

  <input type="checkbox" id="allButMe" onchange="billingSameChanged();" value="true"/> 

thx

+3  A: 

Use jQuery's not selector like this:

$("input:not(#allButMe)").blur(function() { });
Andrew Hare
@Andrew: Since nobody told whats wrong with my answer, I am asking you, could you please tell me whats wrong with my answer ?
Mahesh Velaga
@Mahesh - Nothing as far as I can tell! I upvoted you :)
Andrew Hare
A: 

use jQuery not here

$("input").not("#allButMe").blur(function() {});
Mahesh Velaga
Please leave a comment when downvoting. Thanks
Mahesh Velaga