Skip to content

Instantly share code, notes, and snippets.

@tristian2
Created January 12, 2016 15:31
Show Gist options
  • Save tristian2/75309194c68f3332d80e to your computer and use it in GitHub Desktop.
Save tristian2/75309194c68f3332d80e to your computer and use it in GitHub Desktop.
JQuery selectors
//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