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

  1. 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.

  2. to find decedents of element, can use .find() method, this: $('#anid').find('.child-selector')


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -