Here is my old code:
checkboxes = document.getElementsByName('foo');
As you know, checkboxes will be an array. Now I need to limit selecting scope. So this is my new code:
checkboxes = $('.myclass input[name=foo]');
But in this case checkboxes isn't an array anymore, it's a jQuery object. How can I make it the same as getElementsByName('foo')'s result?
Note that $('.myclass input[name=foo]')[0] won't work either.
checkboxesare inside an container whose class ismyclass. Otherwise$('.myclass input[name=foo]')[0]will definitely work..myclasselement and I don't want to select them. That's why I'm trying to use$('.myclass input[name=foo]')instead ofdocument.getElementsByName('foo'). Anyway, my question is a totally different thing..myclassalso an input?