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
(function (global) { | |
var script = document.createElement('script'); | |
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
script.onload = function () { | |
global.myQuery = global.jQuery.noConflict(); | |
console.log('jQuery has been loaded'); | |
}; | |
global.document.getElementsByTagName('head')[0].appendChild(script); | |
})(window); |
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
(function ($) { | |
var scrollDiv = document.createElement("div"); | |
scrollDiv.style.width = "100px"; | |
scrollDiv.style.height = "100px"; | |
scrollDiv.style.position = "absolute"; | |
scrollDiv.style.top = "-9999px"; | |
scrollDiv.style.overflow= "scroll"; | |
document.body.appendChild(scrollDiv); |
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
wait = function (data) { | |
var check, context, fail, freq, isResetFunction, reset, resetAllTimers, success, timers, waitInner; | |
timers = {}; | |
resetAllTimers = function () { | |
clearTimeout(timers.timer); | |
return clearTimeout(timers.resetTimer); | |
}; | |
check = data.check || null; | |
freq = data.frequency || data.freq || 0; | |
reset = data.reset || null; |
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
(function ($) { | |
var ids = [], | |
sorted = [], | |
repeated = []; | |
$('[id]').each(function () { | |
ids.push(this.id); | |
}); | |
var sorted = ids.sort(); |
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
$.expr[':'].closest = function (elem, index, match) { | |
return $(elem).closest(match[3]).length; | |
}; |
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
$.expr[':'].containsInsensitive = function (elem, index, match) { | |
return $(elem).text().toLowerCase().indexOf(match[3].toLowerCase()) > -1; | |
}; |
NewerOlder