This file contains 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
// Loop all .fetchSize links | |
$('a.fetchSize').each(function(){ | |
// Issue an AJAX HEAD request for each one | |
var link = this; | |
$.ajax({ | |
type:'HEAD', | |
url:link.href, | |
complete: function(xhr){ | |
var size = humanize(xhr.getResponseHeader('Content-Length')); | |
// Append the filesize to each |
This file contains 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).ready(function() { | |
// put all your jQuery goodness in here. | |
$('#sandbox').pluginName({ | |
fontSize : '2em', | |
onComplete : function() { | |
$( this ).fadeOut( 5000 ); | |
}, | |
onSetup : function() { | |
$( this ).css( 'color', 'blue' ); | |
} |
This file contains 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() { | |
$.ajaxSetup({ | |
error: function(jqXHR, exception) { | |
if (jqXHR.status === 0) { | |
alert('Not connect.\n Verify Network.'); | |
} else if (jqXHR.status == 404) { | |
alert('Requested page not found. [404]'); | |
} else if (jqXHR.status == 500) { | |
alert('Internal Server Error [500].'); | |
} else if (exception === 'parsererror') { |
This file contains 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
<!-- To sort or not to sort, that is the question. --> | |
<h3>By price asc</h3> | |
<ul id="u1" style="margin-bottom: 20px;"></ul> | |
<h3>By city desc</h3> | |
<ul id="u2"></ul> |
This file contains 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
// similar behavior as an HTTP redirect | |
window.location.replace("http://stackoverflow.com"); | |
// similar behavior as clicking on a link | |
window.location.href = "http://stackoverflow.com"; |
This file contains 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
$("input").datepicker({ | |
beforeShowDay: nonWorkingDates, | |
numberOfMonths: 1, | |
minDate: '05/01/14', | |
firstDay: 1 | |
}); | |
function nonWorkingDates(date){ | |
var day = date.getDay(), Sunday = 0, Monday = 1, Tuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6; | |
var closedDates = [[7,25, 2014], [8, 14, 2014]]; |
This file contains 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
// in iframe | |
var isInIframe = (window.location != window.parent.location) ? true : false; | |
// or | |
var isIniFrame = function(){ | |
return (window.location != window.parent.location) ? true : false; | |
}; |
This file contains 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
// set | |
var newCodes = function(){ | |
var dCodes = fg.codecsCodes.rs; // Linked ICDs | |
var dCodes2 = fg.codecsCodes2.rs; //Linked CPTs | |
return [dCodes, dCodes2]; | |
}; | |
// get | |
var codes = newCodes(); | |
var dCodes = codes[0]; | |
var dCodes2 = codes[1]; |
This file contains 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 dom = document.getElementById("conteneur-map"); | |
dom.addEventListener('DOMMouseScroll',function(event){ | |
event.stopPropagation(); | |
},false); |
This file contains 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 id="countdown"></div> | |
<div id="newcountdown"></div> |
OlderNewer