Last active
June 13, 2016 12:34
-
-
Save binaryreverse/b7ba9470257d46d8dce97e8e3d1bccd4 to your computer and use it in GitHub Desktop.
Check each element in a nested structure (like a slider) for a specific data attribute and mark these elements visually witha red background (Q&D)
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
$('.my-outer-container').find('.my-element').each(function() { | |
if(typeof $(this).data('my-datakey') === 'undefined') { | |
$(this).css('background', '#FF0000'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment