Skip to content

Instantly share code, notes, and snippets.

{ 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'; },
// 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++){
function getElementsInRegion(x, y, width, height) {
var elements = [],
expando = +new Date,
cx = x,
cy = y,
curEl;
height = y + height;
width = x + width;
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() )
// 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');
}
html {
height: 100%;
background-color: #dfd;
}
body {
position: relative;
min-height: 100%;
width: 960px;
margin: 0 auto;
padding: 0 20px;
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;
/*
* 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
*/
<!DOCTYPE html>
<title>sticky-footer</title>
<style>
html {
height: 100%;
background-color: #dfd;
}
body {
position: relative;
min-height: 100%;
$(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,