Skip to content

Instantly share code, notes, and snippets.

View misterpah's full-sized avatar
😲
you can put status on github now ?!

pah arif misterpah

😲
you can put status on github now ?!
View GitHub Profile
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
}
@misterpah
misterpah / 0_reuse_code.js
Created May 20, 2014 04:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console