wonderfan / javascript

Explore the power of HTML,CSS and JavaScript
1 stars 0 forks source link

find the desired parent #46

Closed wonderfan closed 9 years ago

wonderfan commented 9 years ago

Use closest method:

jQuery("#id_ikepolicy_id").closest("div.form-group").hide();

wonderfan commented 9 years ago

Use parent method with selector filter: https://api.jquery.com/parent/

wonderfan commented 9 years ago

In the meantime, the andSelf and end method should be understood.