Skip to content

Instantly share code, notes, and snippets.

@zxzxlch
Last active August 29, 2015 14:25
Show Gist options
  • Save zxzxlch/922227bf3efd6ad86508 to your computer and use it in GitHub Desktop.
Save zxzxlch/922227bf3efd6ad86508 to your computer and use it in GitHub Desktop.
Web console snippets
// Load jQuery
(function(){
var script = document.createElement('script');
script.type = "text/javascript";
script.src = "http://code.jquery.com/jquery-latest.min.js";
document.getElementsByTagName('head')[0].appendChild(script);
})();
// jQuery.noConflict();
// Load underscore.js
(function(){
var underscoreUrl = "http://underscorejs.org/underscore-min.js"
$.getScript(underscoreUrl, function( data, textStatus, jqxhr ) {
console.log( "Load underscore.js" );
});
})();
// Mapping jQuery objects
var data = _.map($("#ctl00_ContentPlaceHolder1_grdClinic").find(".cl-row"), function(elem) {
var $elem = $(elem);
return elem;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment