开发者

Can i pass an Array element into eq() function

开发者 https://www.devze.com 2023-03-15 10:38 出处:网络
Hi can i pass an array element like below for(var i=0;i<totalNones;i++) { $(this).children(\'td:eq(NoneElementsArray[i])\').find(\'input:checkbox\').hide();

Hi can i pass an array element like below

 for(var i=0;i<totalNones;i++)
       {
           $(this).children('td:eq(NoneElementsArray[i])').find('input:checkbox').hide();
           alert('I am in ');
           $(this).childre开发者_开发问答n('td:eq(NoneElementsArray[i])').append("<input type='radio' class=rad>");
       }

It is not working for me. Please someone help me.


Yes you can, but currently you are using it as a string. Change it to:

$(this).children('td:eq('+NoneElementsArray[i]+')')

0

精彩评论

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