<th class="text-right">
sizzle.master
selectors |
---|
// limit .data number parsing to canonical representations | |
// fixes jQuery tickets #7579; #11297; #10174 | |
(function( $ ) { | |
var fnData = $.fn.data; | |
$.fn.data = function( key, value ) { | |
if ( value === undefined ) { | |
// parse data attributes on every element (including forms with unfortunately-named controls) | |
// before the official jQuery.fn.data gets a chance to |
<th class="text-right">
sizzle.master
selectors |
---|
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>QUnit demo</title> | |
<link rel="stylesheet" type="text/css" href="https://rawgithub.com/gibson042/8592767/raw/9bc1a1a6ec877460420003d3dddf07bdc0304b87/qunit.c621f60e.css"> | |
<script type='text/javascript' src="https://rawgithub.com/gibson042/8592767/raw/6e02a86b147fe8ec4c31db901b31b3ad44c06c34/qunit.c621f60e.js"></script> | |
<script type='text/javascript'> | |
QUnit.config.urlConfig.push({ | |
id: "var", |
// http://bugs.jquery.com/ticket/15098 | |
(function( window ) { | |
var getStyles, curCSS; | |
if ( window.getComputedStyle ) { | |
getStyles = function( elem ) { | |
return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); | |
}; | |
curCSS = function( elem, name, computed ) { | |
var ret; |
/*! | |
* jQuery JavaScript Library v1.11.2-pre | |
* http://jquery.com/ | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ | |
* | |
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors | |
* Released under the MIT license | |
* http://jquery.org/license |
jQuery.xhr
will be an asynchronous HTTP request API returning standards-compliant thenables. We have identified two possible approaches:
options
parameter; advanced functionality via beforeSend
(similar to jQuery.ajax
)options
and/or chainable setters; advanced functionality via send: false
and a chainable send
methodThis gist compares the approaches by imagining their use for current jQuery.ajax
examples. To better highlight differences, chaining methods will be used instead of options
more heavily than is likely in actual practice (assuming that options
is available in the "Chainable" solution).
Clone me with the URL at right! Make changes!
// ==UserScript== | |
// @name Focus Search | |
// @namespace https://github.com/gibson042 | |
// @description Responds to <{Command,Ctrl}+/> by attempting to find and focus a page's search box. | |
// @source https://gist.github.com/gibson042/c9b3406bc54f55726ec4 | |
// @updateURL https://gist.github.com/gibson042/c9b3406bc54f55726ec4/raw/focus_search.user.js | |
// @downloadURL https://gist.github.com/gibson042/c9b3406bc54f55726ec4/raw/focus_search.user.js | |
// @version 0.4.0 | |
// @date 2023-09-08 | |
// @author Richard Gibson <@gmail.com> |