Created
May 31, 2012 23:49
-
-
Save ailabs-software/2847283 to your computer and use it in GitHub Desktop.
Is this good code?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($(_parent).hasClass('item')) | |
{ | |
$(_parent)[selected && $(this).closest('table').find('.item:not(.selected)').length == 0 ? 'addClass' : 'removeClass']('selected'); | |
var _grandparent = $(_parent).parent().parent().parent().parent().parent().siblings(); | |
if ($(_grandparent).hasClass('item')) $(_grandparent)[selected && $(_parent).closest('table').find('.item:not(.selected)').length == 0 ? 'addClass' : 'removeClass']('selected'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment