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
{ name = 'source.js.jquery.embedded.html'; | |
begin = '(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)'; | |
end = '(?<=</(script|SCRIPT))(>)(?:\s*\n)?'; | |
beginCaptures = { | |
1 = { name = 'punctuation.definition.tag.html'; }; | |
2 = { name = 'entity.name.tag.script.html'; }; | |
}; | |
endCaptures = { 2 = { name = 'punctuation.definition.tag.html'; }; }; | |
patterns = ( | |
{ include = '#tag-stuff'; }, |
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
// easy refresh-css keybinding to alt-w | |
// alt-r was taken in IE, so consider this a CSS Weefresh | |
// original code from http://paulirish.com/2008/how-to-iterate-quickly-when-debugging-css/ | |
$(document).keyup(function(e){ | |
if ( e.which == 87 && e.altKey){ | |
var h=0,a=document.getElementsByTagName('link'),l=a.length,f; | |
for(;h<l;h++){ |
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 getElementsInRegion(x, y, width, height) { | |
var elements = [], | |
expando = +new Date, | |
cx = x, | |
cy = y, | |
curEl; | |
height = y + height; | |
width = x + width; |
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
Prevent user from submitting form unless all required fields have been filled (fields already have class="required") | |
Alert user on submit if there are errors. (You may use alert() ) |
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 your active WordPress theme's functions.php file | |
if (!is_admin()) { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', ("http://code.jquery.com/jquery-latest.min.js"), false, '1.4.2'); | |
wp_enqueue_script('jquery'); | |
} |
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
html { | |
height: 100%; | |
background-color: #dfd; | |
} | |
body { | |
position: relative; | |
min-height: 100%; | |
width: 960px; | |
margin: 0 auto; | |
padding: 0 20px; |
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 elem = document.createElement("div"), | |
style = elem.style, | |
userSelectProp = "userSelect" in style && "userSelect"; | |
if (!userSelectProp) { | |
$.each("Moz Webkit Khtml O".split(" "), function(i, v) { | |
var vendorProp = v + "UserSelect"; | |
if ( vendorProp in style ) { | |
userSelectProp = vendorProp; | |
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
/* | |
* Superfish v1.4.8 - jQuery menu widget | |
* Copyright (c) 2008 Joel Birch | |
* | |
* Dual licensed under the MIT and GPL licenses: | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.gnu.org/licenses/gpl.html | |
* | |
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt | |
*/ |
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> | |
<title>sticky-footer</title> | |
<style> | |
html { | |
height: 100%; | |
background-color: #dfd; | |
} | |
body { | |
position: relative; | |
min-height: 100%; |
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() { | |
$.fx.interval = 24; | |
var $flakes = $('span.flake'), | |
rand = Math.random, | |
ceil = Math.ceil, | |
windowWidth = $(window).width(), | |
land = $(document).height() - 295, | |
multipliers = [5,6,8,12,16], | |
mLength = multipliers.length, |
OlderNewer