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
/** | |
* JS: Disable next X working days & weekends | |
* This disables selection of the next X working days in the jQuery datepicker | |
* along with weekends using the built in function | |
* | |
* 14/03/2012 - Oli Mortimer (olimortimer.com) | |
* Originally posted on StackOverflow by Junto (benpowell.co.uk) | |
* | |
* Usage: Change the required number of days in AddWeekDays(X) | |
**/ |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')</script> | |
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js"></script> | |
<script>window.jQuery.ui || document.write('<script src="js/jquery-ui-1.8.21.min.js"><\/script>')</script> | |
<script src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> | |
<script>window.swfobject || document.write('<script src="js/swfobject-2.2"><\/script>')</script> | |
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
// The ajax.php file must also return header('Access-Control-Allow-Origin: *'); | |
if ($.browser.msie && window.XDomainRequest) { | |
// Use Microsoft XDR | |
var xdr = new XDomainRequest(); | |
xdr.open("POST", js_base_url + 'ajax?id='+id); | |
xdr.onload = function () { | |
var JSON = $.parseJSON(xdr.responseText); | |
alert(JSON.response); |
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
$('#filterfeedback form').fadeOut(250, function() { | |
$('#filterfeedback').append('<div class="successBox alertInner"><p>Filter applied</p></div>').hide().fadeIn(500, function() { | |
$('#filterfeedback .successBox').delay(1500).fadeOut(250, function() { | |
$('#filterfeedback form').fadeIn(500); | |
}); | |
}); | |
}); |
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() { | |
// Set each date picker with a min / max date of what was chosen in the other | |
$("#date_from").datepicker({ | |
dateFormat: "dd/mm/yy", | |
onClose: function(dateValue, inst) { | |
$("#date_to").datepicker("option", "minDate", dateValue); | |
} | |
}); | |
$("#date_to").datepicker({ | |
dateFormat: "dd/mm/yy", |
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
<?php | |
// There's no built in function to check if data is serialized or not | |
// other than trying to unserialize it, and receiving an error if it isn't... | |
function is_serialized($data){ | |
if(trim($data) == "") { | |
return false; | |
} | |
if(preg_match("/^(i|s|a|o|d)(.*);/si",$data)) { |
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() { | |
// Open rel="external" in a new window | |
$('a[rel*=external]').click(function(){ | |
window.open(this.href); | |
return 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>CSS drop-shadows</title> | |
<style> | |
body { | |
padding:20px 0 30px; | |
font:14px/1.5 Arial, sans-serif; | |
text-align:center; |
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
// www.website.com/page?id=100 | |
$('#pageLink').attr('href', $('#pageLink').attr('href').replace(/((\?|&)id\=)[0-9]*/, '$1' + '123')); | |
// www.website.com/page?id=123 |
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
/* | |
The jQuery Mobile "loading" message allows users to click on UI items around it | |
Using Mike Alsup's BlockUI, we can stop this | |
http://jquery.malsup.com/block/#download | |
Thanks to MorningZ | |
https://gist.github.com/MorningZ | |
*/ | |
// Add this right before the closing <body> tag |
OlderNewer