Created
January 12, 2016 15:31
-
-
Save tristian2/75309194c68f3332d80e to your computer and use it in GitHub Desktop.
JQuery selectors
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
//just for the console | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// ... give time for script to load, then type. | |
jQuery.noConflict() | |
//just for the console END | |
jQuery(document).ready(function() { | |
console.log('doc ready...'); | |
jQuery('.ms-listviewtable tr:nth-child(2n+3)').attr("style","border: solid 1px black;"); | |
jQuery('.ms-listviewtable tr:nth-child(odd)').attr("style","background-color: green;"); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment