How would you reduce your collection of elements to just spans in JQuery? -
i have been asked couple of questions in regards jquery , not entirely sure on how answer them?
1 how reduce collection of elements spans? 2. given have found $('#anid'), how add context jquery selector restrict scope of search 1 of children?
any appreciated
thanks
i assume in 'reduce collection of elements spans' mean 'get spans in page' - in case, can
$('span')
(how awesome that? :) ). more information, visit jquery selector documentation.to find decedents of element, can use .find() method, this:
$('#anid').find('.child-selector')
Comments
Post a Comment