Last Updated: February 25, 2016
·
509
· tmaster

Tips on jQuery selector.

  1. Select multiple elements.

    jQuery('element1, element2, element3') ;
  2. Select a particular type of elements within an element.

    jQuery('tr', 'element1');

    This selects all the tr elements inside element1.
    The same thing can be achieved using:

    jQuery('element1').find('tr');

    or

    jQuery('element1 tr');