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
$(document).click(function(e) { | |
if (($('.popover').has(e.target).length == 0) || $(e.target).is('.close')) { | |
$('.add_btn').popover('hide'); | |
} | |
}); |
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() { | |
try { | |
var $_console$$ = console; | |
Object.defineProperty(window, "console", { | |
get: function() { | |
if ($_console$$._commandLineAPI) | |
throw "Sorry, for security reasons, the script console is deactivated"; | |
return $_console$$ | |
}, | |
set: function($val$$) { |
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
$(document).on('pageshow', '#index', function(){ | |
$(".dragzones").draggable({ | |
start: handleDragStart, | |
cursor: 'move', | |
revert: "invalid", | |
}); | |
$(".dropzones").droppable({ | |
drop: handleDropEvent, | |
tolerance: "touch", | |
}); |
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
$(':checkbox').map(function() { | |
return this.id; | |
}).get().join(','); |
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
var blkstr = $.map(value, function(val,index) { | |
var str = index + ":" + val; | |
return str; | |
}).join(", "); |
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
$('div').on("mouseenter mouseleave", function(e) { | |
$(this).toggleClass('highlight', e.type === "mouseenter"); | |
}); |
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
jQuery.preloadCssImages = function(){ | |
var allImgs = [];//new array for all the image urls | |
var k = 0; //iterator for adding images | |
var sheets = document.styleSheets;//array of stylesheets | |
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
var people = [ | |
{'name': 'a75','item1': false,'item2': false}, | |
{'name': 'z32','item1': true,'item2': false}, | |
{'name': 'e77','item1': false,'item2': false}, | |
]; | |
function sortByKey(array, key, asc) { | |
var asc = asc || false; |
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($) { | |
/* get key code */ | |
function getKeyCode(key) { | |
//return the key code | |
return (key == null) ? event.keyCode : key.keyCode; | |
} | |
/* get key character */ | |
function getKey(key) { | |
//return the key |
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
// jQuery Plugin Boilerplate | |
// A boilerplate for jumpstarting jQuery plugins development | |
// version 1.1, May 14th, 2011 | |
// by Stefan Gabos | |
// remember to change every instance of "pluginName" to the name of your plugin! | |
(function($) { | |
// here we go! | |
$.pluginName = function(element, options) { |