joomla/joomla-cms — pull request #2564 by ecsspert (2013-11-19 18:51:26+00:00)
Title: [#32762] improve jquery selector

In the media/jui/js/treeselectmenu.jquery.js file I notice some inefficient silly jQuery selectors:

94: $(this).parent().parent().parent().parent().parent().parent().find('ul.treeselect-sub input').attr('checked', 'checked');
98: $(this).parent().parent().parent().parent().parent().parent().find('ul.treeselect-sub input').attr('checked', false);
104: $parent = $(this).parent().parent().parent().parent().parent().parent().parent();
111: $parent = $(this).parent().parent().parent().parent().parent().parent().parent();

The sollution would be to replace this with .parents().eq() so the resulting code would be

Please instruct me if I'm not doing the pull request correctly since I would really love to contribute in improving this code.