Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
56
rated 0 times [  61] [ 5]  / answers: 1 / hits: 75847  / 11 Years ago, tue, april 30, 2013, 12:00:00

I am using this



var abc = jQuery('#pl_hid_addon_name').val(); 
alert(abc);

var atLeastOneIsChecked = jQuery('input[name=addon-'+abc+']:checked').length ;
alert(atLeastOneIsChecked);


But it not worked
It should be after concatenate like below



var atLeastOneIsChecked = jQuery('input[name=addon-base-bar2[]]:checked').length;

More From » jquery

 Answers
5
var atLeastOneIsChecked = jQuery('input[name=addon-'+abc+']:checked').length;
^
|


You used the closing at the wrong place



var atLeastOneIsChecked = jQuery('input[name=addon-'+abc+']:checked').length;
^
|

[#78506] Monday, April 29, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nikhilc

Total Points: 128
Total Questions: 100
Total Answers: 89

Location: Mali
Member since Sat, Feb 12, 2022
2 Years ago
;