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.fn.supersleight = function(settings) { | |
settings = jQuery.extend({ | |
imgs: true, | |
backgrounds: true, | |
shim: 'x.gif', | |
apply_positioning: true | |
}, settings); | |
return this.each(function(){ | |
if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7 && parseInt(jQuery.browser.version, 10) > 4) { |
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
$.fn.setAllToMaxHeight = function(){ | |
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) ); | |
} | |
// usage: $(‘div.unevenheights’).setAllToMaxHeight() | |
// http://www.broken-links.com/2009/01/20/very-quick-equal-height-columns-in-jquery/ |
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
/* Enable or disable DOM objects | |
* This is a basic script - it won't determine | |
* if an object can be enabled or disabled | |
* | |
* Use: $('button').disable(); | |
* $('button').enable(); | |
*/ | |
(function($){ | |
$.fn.extend( { | |
enable : function(){ |
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
// when using the jquery.validation plugin with a tinymce textarea you will need to write the contents of the tinymce area back into the original textarea for jquery.validation to pick up it's new value | |
// force tinymce content to be written back into original textarea element | |
var content = tinyMCE.activeEditor.getContent(); | |
$("textarea.tinymce").val(content); | |
// if all else fails | |
tinyMCE.triggerSave(); | |
after this you can safely apply jquery validation ala... |
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
/* Returns URL parameter | |
* url: http://www.somesite.com?name=hello&id=11111 | |
* z = gup('name'); // z = hello; s = string, or leave blank to target window location | |
* Original code from Netlobo.com (http://www.netlobo.com/url_query_string_javascript.html) | |
*/ | |
function gup(n,s){ | |
n = n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"); | |
var p = (new RegExp("[\\?&]"+n+"=([^&#]*)")).exec(s || window.location.href); | |
return (p===null) ? "" : p[1]; | |
} |
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
MYSQL SLUG FIX | |
The table 'content' contains pages with a slug. This slug should be unique but it isn't. | |
unique_fix.sql fixes this problem and makes the slug-column unique. |
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 invert plugin | |
// by paul irish | |
// some (bad) code from this css color inverter | |
// http://plugins.jquery.com/project/invert-color | |
// some better code via Opera to inverse images via canvas | |
// http://dev.opera.com/articles/view/html-5-canvas-the-basics/#insertingimages | |
// and some imagesLoaded stuff from me | |
// http://gist.github.com/268257 |