code_junkie

Finding appropriate parent with jQuery

Nov 13th, 2011
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. $(".editButton").click(function() {
  2. (magic container selector goes here).addClass("editing");
  3. });
  4.  
  5. $(this).parents('.classYouWant:first').addClass("editing");
Add Comment
Please, Sign In to add comment