Last active
August 29, 2015 14:18
-
-
Save SMaguina/3e5125fc7585336c3c50 to your computer and use it in GitHub Desktop.
Lesson 3/javascript, jquery
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
Javascript: For-loop in jQuery to change CSS properties in the DOM | |
$(function() { | |
var rows = $(".my-row"); | |
console.log("row function"); | |
for(var i=0; i<rows.length; ++i) { | |
if (i%2===0) { | |
$(rows[i]).css("background-color", "grey"); | |
}; | |
}; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment