jquery get an element node

Common knowledge to the point where the record for inspection

$ ( 'Test.') Parent ();. // parent node

$ ( 'Test.') Parents ();. // all parent node

$ ( 'Test.') Parents ( 'test1.');. @ Parent node containing the class name .test1

$ ( 'Test.') Children ();. // all child nodes

$ ( 'Test.') Children ( 'li');. // li elements of all child nodes

. $ ( '. Test') prev (); // a sibling node

$ ( 'Test.') PrevAll ();. // before all siblings

$ ( 'Test.') Next ();. // next sibling node

$ ( 'Test.') NextAll ();. // After all siblings

$ ( 'Test.') Siblings ();. // All siblings

$ ( 'Test.') Siblings ( 'test1.');. @ All siblings containing the class name .test1

$ ( '. Test') find ( 'test1.');. // returns the class selected from elements contained in all descendant element named .test1; (* all in return, a plurality of parameters, separated)

$ ( 'Test.') Contents ();. // return all the contents inside the element, including text and a node

$('.test').contents('.test1');

Guess you like

Origin www.cnblogs.com/yutang-wangweisong/p/11999878.html