jquery取得要素(親ノード、子ノード、兄弟ノード)
952 ワード
,
jquery
$("#test1").parent(); //
$("#test1").parents(); //
$("#test1").parents(".mui-content");// class mui-content
$("#test1").children(); //
$("#test1").children("#test1"); // id test1
$("#test1").contents(); // id test ,
$("#test1").contents("#test1"); // id test id #test1
$("#test1").prev(); //
$("#test1").prevAll(); //
$("#test1").next(); //
$("#test1").nextAll(); //
$("#test1").siblings(); //
$("#test1").siblings("#test2"); // id test2
$("#test").find("#test1"); id test id test1
jquery jq
dom
: $("#test1").parent()[0] dom