ambuli
asked on
Jquery syntax question
Hi there,
What is the difference between the following two versions of checking if a radio button is checked. The second version seems concise but is there any difference. Thanks.
What is the difference between the following two versions of checking if a radio button is checked. The second version seems concise but is there any difference. Thanks.
if($("input[id='SelectorID']").is(":checked")){
}
AND
if($("#SelectorID").is(":checked"){
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Addendum - above figures are for FireFox - in Chrome the times for B and C are switched C is faster than B and both are faster than their equivalents on FF BUT A is significantly slower on A (461 for the 1000 test)