Created
February 17, 2018 07:41
-
-
Save sayham-sjb/c0f695638d585f1a400841b9c2a637fe to your computer and use it in GitHub Desktop.
StyleOddOrEvenDIVUsingjQuery #js #VS
This file contains hidden or 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
$(document).ready(function(){ | |
$("#rstODD").click(function() { | |
$(".oddDiv").css("color", "lime"); | |
$(".oddDiv").css("background-color", "teal"); | |
}); | |
$('#rstEVEN').click(function() { | |
$('.evenDiv').css('color', 'red'); | |
$('.evenDiv').css('background-color', 'blue'); | |
}); | |
$('#rstALL').click(function() { | |
$('.oddDiv').css('color', 'white'); | |
$('.oddDiv').css('background-color', "black"); | |
$('.evenDiv').css("color", 'white'); | |
$('.evenDiv').css("background-color", "black"); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment