mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Strips IIFEs from modules; Always require built jQuery for tests.
This commit is contained in:
parent
9a3046c375
commit
7c23b77af2
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,5 +7,6 @@ dist
|
|||||||
*.patch
|
*.patch
|
||||||
/*.html
|
/*.html
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
dist/.sizecache.json
|
||||||
build/.sizecache.json
|
build/.sizecache.json
|
||||||
node_modules
|
node_modules
|
||||||
|
120
Makefile
120
Makefile
@ -1,116 +1,7 @@
|
|||||||
SRC_DIR = src
|
|
||||||
TEST_DIR = test
|
|
||||||
BUILD_DIR = build
|
|
||||||
|
|
||||||
PREFIX = .
|
all: update_submodules
|
||||||
DIST_DIR = ${PREFIX}/dist
|
|
||||||
|
|
||||||
JS_ENGINE ?= `which node nodejs 2>/dev/null`
|
submoduleclean: clean
|
||||||
COMPILER = ${JS_ENGINE} ${BUILD_DIR}/uglify.js --unsafe
|
|
||||||
POST_COMPILER = ${JS_ENGINE} ${BUILD_DIR}/post-compile.js
|
|
||||||
|
|
||||||
BASE_FILES = ${SRC_DIR}/core.js\
|
|
||||||
${SRC_DIR}/callbacks.js\
|
|
||||||
${SRC_DIR}/deferred.js\
|
|
||||||
${SRC_DIR}/support.js\
|
|
||||||
${SRC_DIR}/data.js\
|
|
||||||
${SRC_DIR}/queue.js\
|
|
||||||
${SRC_DIR}/attributes.js\
|
|
||||||
${SRC_DIR}/event.js\
|
|
||||||
${SRC_DIR}/selector.js\
|
|
||||||
${SRC_DIR}/traversing.js\
|
|
||||||
${SRC_DIR}/manipulation.js\
|
|
||||||
${SRC_DIR}/css.js\
|
|
||||||
${SRC_DIR}/ajax.js\
|
|
||||||
${SRC_DIR}/ajax/jsonp.js\
|
|
||||||
${SRC_DIR}/ajax/script.js\
|
|
||||||
${SRC_DIR}/ajax/xhr.js\
|
|
||||||
${SRC_DIR}/effects.js\
|
|
||||||
${SRC_DIR}/offset.js\
|
|
||||||
${SRC_DIR}/dimensions.js\
|
|
||||||
${SRC_DIR}/exports.js
|
|
||||||
|
|
||||||
MODULES = ${SRC_DIR}/intro.js\
|
|
||||||
${BASE_FILES}\
|
|
||||||
${SRC_DIR}/outro.js
|
|
||||||
|
|
||||||
JQ = ${DIST_DIR}/jquery.js
|
|
||||||
JQ_MIN = ${DIST_DIR}/jquery.min.js
|
|
||||||
|
|
||||||
SIZZLE_DIR = ${SRC_DIR}/sizzle
|
|
||||||
|
|
||||||
JQ_VER = $(shell cat version.txt)
|
|
||||||
VER = sed "s/@VERSION/${JQ_VER}/"
|
|
||||||
|
|
||||||
DATE=$(shell git log -1 --pretty=format:%ad)
|
|
||||||
|
|
||||||
all: update_submodules core
|
|
||||||
|
|
||||||
core: jquery min hint size
|
|
||||||
@@echo "jQuery build complete."
|
|
||||||
|
|
||||||
${DIST_DIR}:
|
|
||||||
@@mkdir -p ${DIST_DIR}
|
|
||||||
|
|
||||||
jquery: ${JQ}
|
|
||||||
|
|
||||||
${JQ}: ${MODULES} | ${DIST_DIR}
|
|
||||||
@@echo "Building" ${JQ}
|
|
||||||
|
|
||||||
@@cat ${MODULES} | \
|
|
||||||
sed 's/.function..jQuery...{//' | \
|
|
||||||
sed 's/}...jQuery..;//' | \
|
|
||||||
sed 's/@DATE/'"${DATE}"'/' | \
|
|
||||||
${VER} > ${JQ};
|
|
||||||
|
|
||||||
${SRC_DIR}/selector.js: ${SIZZLE_DIR}/sizzle.js
|
|
||||||
@@echo "Building selector code from Sizzle"
|
|
||||||
@@sed '/EXPOSE/r src/sizzle-jquery.js' ${SIZZLE_DIR}/sizzle.js | grep -v window.Sizzle > ${SRC_DIR}/selector.js
|
|
||||||
|
|
||||||
hint: jquery
|
|
||||||
@@if test ! -z ${JS_ENGINE}; then \
|
|
||||||
echo "Checking jQuery against JSHint..."; \
|
|
||||||
${JS_ENGINE} build/jshint-check.js; \
|
|
||||||
else \
|
|
||||||
echo "You must have NodeJS installed in order to test jQuery against JSHint."; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
size: jquery min
|
|
||||||
@@if test ! -z ${JS_ENGINE}; then \
|
|
||||||
gzip -c ${JQ_MIN} > ${JQ_MIN}.gz; \
|
|
||||||
wc -c ${JQ} ${JQ_MIN} ${JQ_MIN}.gz | ${JS_ENGINE} ${BUILD_DIR}/sizer.js; \
|
|
||||||
rm ${JQ_MIN}.gz; \
|
|
||||||
else \
|
|
||||||
echo "You must have NodeJS installed in order to size jQuery."; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
freq: jquery min
|
|
||||||
@@if test ! -z ${JS_ENGINE}; then \
|
|
||||||
${JS_ENGINE} ${BUILD_DIR}/freq.js; \
|
|
||||||
else \
|
|
||||||
echo "You must have NodeJS installed to report the character frequency of minified jQuery."; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
min: jquery ${JQ_MIN}
|
|
||||||
|
|
||||||
${JQ_MIN}: ${JQ}
|
|
||||||
@@if test ! -z ${JS_ENGINE}; then \
|
|
||||||
echo "Minifying jQuery" ${JQ_MIN}; \
|
|
||||||
${COMPILER} ${JQ} > ${JQ_MIN}.tmp; \
|
|
||||||
${POST_COMPILER} ${JQ_MIN}.tmp; \
|
|
||||||
rm -f ${JQ_MIN}.tmp; \
|
|
||||||
else \
|
|
||||||
echo "You must have NodeJS installed in order to minify jQuery."; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@@echo "Removing Distribution directory:" ${DIST_DIR}
|
|
||||||
@@rm -rf ${DIST_DIR}
|
|
||||||
|
|
||||||
@@echo "Removing built copy of Sizzle"
|
|
||||||
@@rm -f src/selector.js
|
|
||||||
|
|
||||||
distclean: clean
|
|
||||||
@@echo "Removing submodules"
|
@@echo "Removing submodules"
|
||||||
@@rm -rf test/qunit src/sizzle
|
@@rm -rf test/qunit src/sizzle
|
||||||
|
|
||||||
@ -129,9 +20,6 @@ update_submodules:
|
|||||||
# update the submodules to the latest at the most logical branch
|
# update the submodules to the latest at the most logical branch
|
||||||
pull_submodules:
|
pull_submodules:
|
||||||
@@git submodule foreach "git pull \$$(git config remote.origin.url)"
|
@@git submodule foreach "git pull \$$(git config remote.origin.url)"
|
||||||
@@git submodule summary
|
#@@git submodule summary
|
||||||
|
|
||||||
pull: pull_submodules
|
.PHONY: all submoduleclean update_submodules pull_submodules
|
||||||
@@git pull ${REMOTE} ${BRANCH}
|
|
||||||
|
|
||||||
.PHONY: all jquery hint min clean distclean update_submodules pull_submodules pull core
|
|
||||||
|
75
README.md
75
README.md
@ -11,21 +11,10 @@ In the spirit of open source software development, jQuery always encourages comm
|
|||||||
3. [Tips For Bug Patching](http://docs.jquery.com/Tips_for_jQuery_Bug_Patching)
|
3. [Tips For Bug Patching](http://docs.jquery.com/Tips_for_jQuery_Bug_Patching)
|
||||||
|
|
||||||
|
|
||||||
Running the Unit Tests
|
|
||||||
--------------------------------------
|
|
||||||
|
|
||||||
Run the unit tests with a local server that supports PHP. No database is required. Pre-configured php local servers are available for Windows and Mac. Here are some options:
|
|
||||||
|
|
||||||
- Windows: [WAMP download](http://www.wampserver.com/en/)
|
|
||||||
- Mac: [MAMP download](http://www.mamp.info/en/index.html)
|
|
||||||
- Linux: [Setting up LAMP](https://www.linux.com/learn/tutorials/288158-easy-lamp-server-installation)
|
|
||||||
- [Mongoose (most platforms)](http://code.google.com/p/mongoose/)
|
|
||||||
|
|
||||||
|
|
||||||
What you need to build your own jQuery
|
What you need to build your own jQuery
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
In order to build jQuery, you need to have GNU make 3.8 or later, Node.js 0.4.12 or later, and git 1.7 or later.
|
In order to build jQuery, you need to have GNU make 3.8 or later, Node.js/npm latest, and git 1.7 or later.
|
||||||
(Earlier versions might work OK, but are not tested.)
|
(Earlier versions might work OK, but are not tested.)
|
||||||
|
|
||||||
Windows users have two options:
|
Windows users have two options:
|
||||||
@ -50,32 +39,66 @@ if you swing that way. Easy-peasy.
|
|||||||
How to build your own jQuery
|
How to build your own jQuery
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
First, clone a copy of the main jQuery git repo by running `git clone git://github.com/jquery/jquery.git`.
|
First, clone a copy of the main jQuery git repo by running:
|
||||||
|
|
||||||
|
`git clone git://github.com/jquery/jquery.git`
|
||||||
|
|
||||||
|
Enter the directory and install the node dependencies:
|
||||||
|
|
||||||
|
`cd jquery && npm install`
|
||||||
|
|
||||||
|
|
||||||
|
Make sure you have `grunt` installed by testing:
|
||||||
|
|
||||||
|
`grunt -version`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Then, to get a complete, minified (w/ Ugligy.js), linted (w/ JSHint) version of jQuery, type the following:
|
||||||
|
|
||||||
|
`grunt`
|
||||||
|
|
||||||
Then, to get a complete, minified, jslinted version of jQuery, simply `cd` to the `jquery` directory and type
|
|
||||||
`make`. If you don't have Node installed and/or want to make a basic, uncompressed, unlinted version of jQuery, use
|
|
||||||
`make jquery` instead of `make`.
|
|
||||||
|
|
||||||
The built version of jQuery will be put in the `dist/` subdirectory.
|
The built version of jQuery will be put in the `dist/` subdirectory.
|
||||||
|
|
||||||
To remove all built files, run `make clean`.
|
|
||||||
|
Running the Unit Tests
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
Start grunt to auto-build jQuery as you work:
|
||||||
|
|
||||||
|
`cd jquery && grunt watch`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Run the unit tests with a local server that supports PHP. No database is required. Pre-configured php local servers are available for Windows and Mac. Here are some options:
|
||||||
|
|
||||||
|
- Windows: [WAMP download](http://www.wampserver.com/en/)
|
||||||
|
- Mac: [MAMP download](http://www.mamp.info/en/index.html)
|
||||||
|
- Linux: [Setting up LAMP](https://www.linux.com/learn/tutorials/288158-easy-lamp-server-installation)
|
||||||
|
- [Mongoose (most platforms)](http://code.google.com/p/mongoose/)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Building to a different directory
|
Building to a different directory
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
If you want to build jQuery to a directory that is different from the default location, you can specify the PREFIX
|
If you want to build jQuery to a directory that is different from the default location:
|
||||||
directory: `make PREFIX=/home/jquery/test/ [command]`
|
|
||||||
|
|
||||||
With this example, the output files would end up in `/home/jquery/test/dist/`.
|
`grunt && grunt dist:/Users/you/Dropbox/Public/`
|
||||||
|
|
||||||
|
With this example, the output files would be:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
|
||||||
|
/Users/you/Dropbox/Public/jquery.js
|
||||||
|
/Users/you/Dropbox/Public/jquery.min.js
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Troubleshooting
|
|
||||||
---------------
|
|
||||||
|
|
||||||
Sometimes, the various git repositories get into an inconsistent state where builds don't complete properly
|
|
||||||
(usually this results in the jquery.js or jquery.min.js being 0 bytes). If this happens, run `make clean`, then
|
|
||||||
run `make` again.
|
|
||||||
|
|
||||||
Git for dummies
|
Git for dummies
|
||||||
---------------
|
---------------
|
||||||
|
65
grunt.js
65
grunt.js
@ -13,6 +13,10 @@ module.exports = function( grunt ) {
|
|||||||
var option = grunt.option;
|
var option = grunt.option;
|
||||||
var config = grunt.config;
|
var config = grunt.config;
|
||||||
var template = grunt.template;
|
var template = grunt.template;
|
||||||
|
var distpaths = [
|
||||||
|
"dist/jquery.js",
|
||||||
|
"dist/jquery.min.js"
|
||||||
|
];
|
||||||
|
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: "<json:package.json>",
|
pkg: "<json:package.json>",
|
||||||
@ -20,10 +24,7 @@ module.exports = function( grunt ) {
|
|||||||
banner: "/*! jQuery v@<%= pkg.version %> jquery.com | jquery.org/license */"
|
banner: "/*! jQuery v@<%= pkg.version %> jquery.com | jquery.org/license */"
|
||||||
},
|
},
|
||||||
compare_size: {
|
compare_size: {
|
||||||
files: [
|
files: distpaths
|
||||||
"dist/jquery.js",
|
|
||||||
"dist/jquery.min.js"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
selector: {
|
selector: {
|
||||||
"src/selector.js": [
|
"src/selector.js": [
|
||||||
@ -67,8 +68,8 @@ module.exports = function( grunt ) {
|
|||||||
files: "test/index.html"
|
files: "test/index.html"
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
files: "<config:lint.files>",
|
files: [ "<config:lint.files>", "src/**/*.js" ],
|
||||||
tasks: "concat lint"
|
tasks: "default"
|
||||||
},
|
},
|
||||||
jshint: {
|
jshint: {
|
||||||
options: {
|
options: {
|
||||||
@ -103,7 +104,7 @@ module.exports = function( grunt ) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Default grunt.
|
// Default grunt.
|
||||||
grunt.registerTask( "default", "selector build:*:* lint min compare_size" );
|
grunt.registerTask( "default", "submodules selector build:*:* dist:* lint min compare_size" );
|
||||||
|
|
||||||
grunt.loadNpmTasks("grunt-compare-size");
|
grunt.loadNpmTasks("grunt-compare-size");
|
||||||
|
|
||||||
@ -184,7 +185,8 @@ module.exports = function( grunt ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Unwrap redundant IIFEs
|
// Unwrap redundant IIFEs
|
||||||
compiled += file.read( filepath ).replace( /^\(function\( jQuery \) \{|\}\)\( jQuery \);\s*$/g, "" );
|
compiled += file.read( filepath );
|
||||||
|
//.replace( /^\(function\( jQuery \) \{|\}\)\( jQuery \);\s*$/g, "" );
|
||||||
});
|
});
|
||||||
|
|
||||||
// Embed Date
|
// Embed Date
|
||||||
@ -203,4 +205,51 @@ module.exports = function( grunt ) {
|
|||||||
// Otherwise, print a success message.
|
// Otherwise, print a success message.
|
||||||
log.writeln( "File '" + name + "' created." );
|
log.writeln( "File '" + name + "' created." );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
grunt.registerTask( "submodules", function() {
|
||||||
|
var done = this.async();
|
||||||
|
|
||||||
|
grunt.verbose.write( "Updating submodules..." );
|
||||||
|
|
||||||
|
// TODO: migrate remaining `make` to grunt tasks
|
||||||
|
//
|
||||||
|
grunt.utils.spawn({
|
||||||
|
cmd: "make"
|
||||||
|
}, function( err, result ) {
|
||||||
|
if ( err ) {
|
||||||
|
grunt.verbose.error();
|
||||||
|
done( err );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
grunt.log.writeln( result );
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Allow custom dist file locations
|
||||||
|
grunt.registerTask( "dist", function() {
|
||||||
|
var keys, dir;
|
||||||
|
|
||||||
|
keys = Object.keys( this.flags );
|
||||||
|
|
||||||
|
if ( keys.length ) {
|
||||||
|
dir = keys[0];
|
||||||
|
|
||||||
|
if ( !/\/$/.test( dir ) ) {
|
||||||
|
dir += "/";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 'distpaths' is declared at the top of the
|
||||||
|
// module.exports function scope.
|
||||||
|
distpaths.forEach(function( filename ) {
|
||||||
|
var created = dir + filename.replace( "dist/", "" );
|
||||||
|
|
||||||
|
file.write( created, file.read( filename ) );
|
||||||
|
|
||||||
|
log.writeln( "File '" + created + "' created." );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
var r20 = /%20/g,
|
var r20 = /%20/g,
|
||||||
rbracket = /\[\]$/,
|
rbracket = /\[\]$/,
|
||||||
rCRLF = /\r?\n/g,
|
rCRLF = /\r?\n/g,
|
||||||
@ -993,5 +991,3 @@ function ajaxConvert( s, response ) {
|
|||||||
|
|
||||||
return { state: "success", data: response };
|
return { state: "success", data: response };
|
||||||
}
|
}
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
var oldCallbacks = [],
|
var oldCallbacks = [],
|
||||||
rquestion = /\?/,
|
rquestion = /\?/,
|
||||||
rjsonp = /(=)\?(?=&|$)|\?\?/,
|
rjsonp = /(=)\?(?=&|$)|\?\?/,
|
||||||
@ -87,5 +85,3 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
|||||||
return "script";
|
return "script";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
// Install script dataType
|
// Install script dataType
|
||||||
jQuery.ajaxSetup({
|
jQuery.ajaxSetup({
|
||||||
accepts: {
|
accepts: {
|
||||||
@ -85,5 +83,3 @@ jQuery.ajaxTransport( "script", function(s) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
|
var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
|
||||||
xhrOnUnloadAbort = window.ActiveXObject ? function() {
|
xhrOnUnloadAbort = window.ActiveXObject ? function() {
|
||||||
// Abort all pending requests
|
// Abort all pending requests
|
||||||
@ -222,5 +220,3 @@ if ( jQuery.support.ajax ) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
var rclass = /[\n\t\r]/g,
|
var rclass = /[\n\t\r]/g,
|
||||||
rspace = /\s+/,
|
rspace = /\s+/,
|
||||||
rreturn = /\r/g,
|
rreturn = /\r/g,
|
||||||
@ -652,5 +650,3 @@ jQuery.each([ "radio", "checkbox" ], function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
// String to Object options format cache
|
// String to Object options format cache
|
||||||
var optionsCache = {};
|
var optionsCache = {};
|
||||||
|
|
||||||
@ -192,5 +190,3 @@ jQuery.Callbacks = function( options ) {
|
|||||||
|
|
||||||
return self;
|
return self;
|
||||||
};
|
};
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
27
src/core.js
27
src/core.js
@ -1,7 +1,18 @@
|
|||||||
var jQuery = (function() {
|
// Use the correct document accordingly with window argument (sandbox)
|
||||||
|
var document = window.document,
|
||||||
|
navigator = window.navigator,
|
||||||
|
location = window.location,
|
||||||
|
|
||||||
|
// Save a reference to some core methods
|
||||||
|
toString = Object.prototype.toString,
|
||||||
|
hasOwn = Object.prototype.hasOwnProperty,
|
||||||
|
push = Array.prototype.push,
|
||||||
|
slice = Array.prototype.slice,
|
||||||
|
trim = String.prototype.trim,
|
||||||
|
indexOf = Array.prototype.indexOf,
|
||||||
|
|
||||||
// Define a local copy of jQuery
|
// Define a local copy of jQuery
|
||||||
var jQuery = function( selector, context ) {
|
jQuery = function( selector, context ) {
|
||||||
// The jQuery object is actually just the init constructor 'enhanced'
|
// The jQuery object is actually just the init constructor 'enhanced'
|
||||||
return new jQuery.fn.init( selector, context, rootjQuery );
|
return new jQuery.fn.init( selector, context, rootjQuery );
|
||||||
},
|
},
|
||||||
@ -71,14 +82,6 @@ var jQuery = function( selector, context ) {
|
|||||||
jQuery.ready();
|
jQuery.ready();
|
||||||
},
|
},
|
||||||
|
|
||||||
// Save a reference to some core methods
|
|
||||||
toString = Object.prototype.toString,
|
|
||||||
hasOwn = Object.prototype.hasOwnProperty,
|
|
||||||
push = Array.prototype.push,
|
|
||||||
slice = Array.prototype.slice,
|
|
||||||
trim = String.prototype.trim,
|
|
||||||
indexOf = Array.prototype.indexOf,
|
|
||||||
|
|
||||||
// [[Class]] -> type pairs
|
// [[Class]] -> type pairs
|
||||||
class2type = {};
|
class2type = {};
|
||||||
|
|
||||||
@ -933,7 +936,3 @@ function doScrollCheck() {
|
|||||||
// and execute any waiting functions
|
// and execute any waiting functions
|
||||||
jQuery.ready();
|
jQuery.ready();
|
||||||
}
|
}
|
||||||
|
|
||||||
return jQuery;
|
|
||||||
|
|
||||||
})();
|
|
||||||
|
93
src/css.js
93
src/css.js
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
// order is important!
|
// order is important!
|
||||||
jQuery.cssExpand = [ "Top", "Right", "Bottom", "Left" ];
|
jQuery.cssExpand = [ "Top", "Right", "Bottom", "Left" ];
|
||||||
|
|
||||||
@ -66,7 +64,7 @@ function showHide( elements, show ) {
|
|||||||
// for such an element
|
// for such an element
|
||||||
if ( (elem.style.display === "" && curCSS( elem, "display" ) === "none") ||
|
if ( (elem.style.display === "" && curCSS( elem, "display" ) === "none") ||
|
||||||
!jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
|
!jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
|
||||||
values[ index ] = jQuery._data( elem, "olddisplay", jQuery.defaultDisplay(elem.nodeName) );
|
values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
display = curCSS( elem, "display" );
|
display = curCSS( elem, "display" );
|
||||||
@ -264,49 +262,6 @@ jQuery.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
},
|
|
||||||
|
|
||||||
// Try to determine the default display value of an element
|
|
||||||
defaultDisplay: function( nodeName ) {
|
|
||||||
if ( elemdisplay[ nodeName ] ) {
|
|
||||||
return elemdisplay[ nodeName ];
|
|
||||||
}
|
|
||||||
|
|
||||||
var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ),
|
|
||||||
display = elem.css("display");
|
|
||||||
elem.remove();
|
|
||||||
|
|
||||||
// If the simple way fails,
|
|
||||||
// get element's real default display by attaching it to a temp iframe
|
|
||||||
if ( display === "none" || display === "" ) {
|
|
||||||
// Use the already-created iframe if possible
|
|
||||||
iframe = document.body.appendChild(
|
|
||||||
iframe || jQuery.extend( document.createElement("iframe"), {
|
|
||||||
frameBorder: 0,
|
|
||||||
width: 0,
|
|
||||||
height: 0
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
// Create a cacheable copy of the iframe document on first call.
|
|
||||||
// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
|
|
||||||
// document to it; WebKit & Firefox won't allow reusing the iframe document.
|
|
||||||
if ( !iframeDoc || !iframe.createElement ) {
|
|
||||||
iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
|
|
||||||
iframeDoc.write("<!doctype html><html><body>");
|
|
||||||
iframeDoc.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) );
|
|
||||||
|
|
||||||
display = curCSS( elem, "display" );
|
|
||||||
document.body.removeChild( iframe );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Store the correct default display
|
|
||||||
elemdisplay[ nodeName ] = display;
|
|
||||||
|
|
||||||
return display;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -466,6 +421,50 @@ function getWidthOrHeight( elem, name, extra ) {
|
|||||||
) + "px";
|
) + "px";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Try to determine the default display value of an element
|
||||||
|
function defaultDisplay( nodeName ) {
|
||||||
|
if ( elemdisplay[ nodeName ] ) {
|
||||||
|
return elemdisplay[ nodeName ];
|
||||||
|
}
|
||||||
|
|
||||||
|
var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ),
|
||||||
|
display = elem.css("display");
|
||||||
|
elem.remove();
|
||||||
|
|
||||||
|
// If the simple way fails,
|
||||||
|
// get element's real default display by attaching it to a temp iframe
|
||||||
|
if ( display === "none" || display === "" ) {
|
||||||
|
// Use the already-created iframe if possible
|
||||||
|
iframe = document.body.appendChild(
|
||||||
|
iframe || jQuery.extend( document.createElement("iframe"), {
|
||||||
|
frameBorder: 0,
|
||||||
|
width: 0,
|
||||||
|
height: 0
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Create a cacheable copy of the iframe document on first call.
|
||||||
|
// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
|
||||||
|
// document to it; WebKit & Firefox won't allow reusing the iframe document.
|
||||||
|
if ( !iframeDoc || !iframe.createElement ) {
|
||||||
|
iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
|
||||||
|
iframeDoc.write("<!doctype html><html><body>");
|
||||||
|
iframeDoc.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) );
|
||||||
|
|
||||||
|
display = curCSS( elem, "display" );
|
||||||
|
document.body.removeChild( iframe );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the correct default display
|
||||||
|
elemdisplay[ nodeName ] = display;
|
||||||
|
|
||||||
|
return display;
|
||||||
|
}
|
||||||
|
|
||||||
jQuery.each([ "height", "width" ], function( i, name ) {
|
jQuery.each([ "height", "width" ], function( i, name ) {
|
||||||
jQuery.cssHooks[ name ] = {
|
jQuery.cssHooks[ name ] = {
|
||||||
get: function( elem, computed, extra ) {
|
get: function( elem, computed, extra ) {
|
||||||
@ -594,5 +593,3 @@ jQuery.each({
|
|||||||
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
|
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
var rbrace = /^(?:\{.*\}|\[.*\])$/,
|
var rbrace = /^(?:\{.*\}|\[.*\])$/,
|
||||||
rmultiDash = /([A-Z])/g;
|
rmultiDash = /([A-Z])/g;
|
||||||
|
|
||||||
@ -368,5 +366,3 @@ function isEmptyDataObject( obj ) {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
var // Static reference to slice
|
var // Static reference to slice
|
||||||
sliceDeferred = [].slice;
|
sliceDeferred = [].slice;
|
||||||
|
|
||||||
@ -144,5 +142,3 @@ jQuery.extend({
|
|||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
||||||
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
||||||
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
|
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
|
||||||
@ -44,5 +42,3 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
2
src/effects.js
vendored
2
src/effects.js
vendored
@ -253,7 +253,7 @@ function defaultPrefilter( elem, props, opts ) {
|
|||||||
|
|
||||||
// inline-level elements accept inline-block;
|
// inline-level elements accept inline-block;
|
||||||
// block-level elements need to be inline with layout
|
// block-level elements need to be inline with layout
|
||||||
if ( !jQuery.support.inlineBlockNeedsLayout || jQuery.defaultDisplay( elem.nodeName ) === "inline" ) {
|
if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
|
||||||
style.display = "inline-block";
|
style.display = "inline-block";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
var rformElems = /^(?:textarea|input|select)$/i,
|
var rformElems = /^(?:textarea|input|select)$/i,
|
||||||
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
|
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
|
||||||
rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
|
rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
|
||||||
@ -1071,5 +1069,3 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
|
|||||||
jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
|
jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
// Expose jQuery to the global object
|
// Expose jQuery to the global object
|
||||||
window.jQuery = window.$ = jQuery;
|
window.jQuery = window.$ = jQuery;
|
||||||
|
|
||||||
@ -18,5 +16,3 @@ window.jQuery = window.$ = jQuery;
|
|||||||
if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
||||||
define( "jquery", [], function () { return jQuery; } );
|
define( "jquery", [], function () { return jQuery; } );
|
||||||
}
|
}
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -14,8 +14,3 @@
|
|||||||
* Date: @DATE
|
* Date: @DATE
|
||||||
*/
|
*/
|
||||||
(function( window, undefined ) {
|
(function( window, undefined ) {
|
||||||
|
|
||||||
// Use the correct document accordingly with window argument (sandbox)
|
|
||||||
var document = window.document,
|
|
||||||
navigator = window.navigator,
|
|
||||||
location = window.location;
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
function createSafeFragment( document ) {
|
function createSafeFragment( document ) {
|
||||||
var list = nodeNames.split( "|" ),
|
var list = nodeNames.split( "|" ),
|
||||||
safeFrag = document.createDocumentFragment();
|
safeFrag = document.createDocumentFragment();
|
||||||
@ -799,5 +797,3 @@ jQuery.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
var rroot = /^(?:body|html)$/i;
|
var rroot = /^(?:body|html)$/i;
|
||||||
|
|
||||||
jQuery.fn.offset = function( options ) {
|
jQuery.fn.offset = function( options ) {
|
||||||
@ -180,5 +178,3 @@ function getWindow( elem ) {
|
|||||||
elem.defaultView || elem.parentWindow :
|
elem.defaultView || elem.parentWindow :
|
||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
})( jQuery );
|
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
jQuery.extend({
|
jQuery.extend({
|
||||||
queue: function( elem, type, data ) {
|
queue: function( elem, type, data ) {
|
||||||
var queue;
|
var queue;
|
||||||
@ -142,5 +140,3 @@ jQuery.fn.extend({
|
|||||||
return defer.promise( object );
|
return defer.promise( object );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
jQuery.support = (function() {
|
jQuery.support = (function() {
|
||||||
|
|
||||||
var support,
|
var support,
|
||||||
@ -268,5 +266,3 @@ jQuery.support = (function() {
|
|||||||
|
|
||||||
return support;
|
return support;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
(function( jQuery ) {
|
|
||||||
|
|
||||||
var runtil = /Until$/,
|
var runtil = /Until$/,
|
||||||
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
|
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
|
||||||
// Note: This RegExp should be improved, or likely pulled from Sizzle
|
// Note: This RegExp should be improved, or likely pulled from Sizzle
|
||||||
rmultiselector = /,/,
|
rmultiselector = /,/,
|
||||||
isSimple = /^.[^:#\[\.,]*$/,
|
isSimple = /^.[^:#\[\.,]*$/,
|
||||||
slice = Array.prototype.slice,
|
|
||||||
POS = jQuery.expr.match.globalPOS,
|
POS = jQuery.expr.match.globalPOS,
|
||||||
// methods guaranteed to produce a unique set when starting from a unique set
|
// methods guaranteed to produce a unique set when starting from a unique set
|
||||||
guaranteedUnique = {
|
guaranteedUnique = {
|
||||||
@ -299,5 +296,3 @@ function winnow( elements, qualifier, keep ) {
|
|||||||
return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
|
return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>CSP Test Page</title>
|
<title>CSP Test Page</title>
|
||||||
|
|
||||||
<script src="data/include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>CSP Test Page</p>
|
<p>CSP Test Page</p>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -15,7 +15,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -19,7 +19,7 @@ if ( document.attachEvent ) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
document.getElementsByTagName("head")[ 0 ].appendChild( el );
|
document.getElementsByTagName("head")[ 0 ].appendChild( el );
|
||||||
el.src = "../include_js.php";
|
el.src = "/dist/jquery.js";
|
||||||
}, 1000 );
|
}, 1000 );
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<title>Test case for jQuery ticket #11470</title>
|
<title>Test case for jQuery ticket #11470</title>
|
||||||
<script type="text/javascript" src="../include_js.php"></script>
|
<script type="text/javascript" src="/dist/jquery.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery.when( jQuery.ready ).done(function() {
|
jQuery.when( jQuery.ready ).done(function() {
|
||||||
jQuery("body").append("<div>modifying DOM</div>");
|
jQuery("body").append("<div>modifying DOM</div>");
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<title>Test case for jQuery ticket #10067</title>
|
<title>Test case for jQuery ticket #10067</title>
|
||||||
<script type="text/javascript" src="../include_js.php"></script>
|
<script type="text/javascript" src="/dist/jquery.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
p.instructions { position: absolute; bottom: 0; }
|
p.instructions { position: absolute; bottom: 0; }
|
||||||
#positionTest { position: absolute; }
|
#positionTest { position: absolute; }
|
||||||
</style>
|
</style>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
jQuery(function($) {
|
jQuery(function($) {
|
||||||
$('.absolute').click(function() {
|
$('.absolute').click(function() {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
body { margin: 1px; padding: 5px; }
|
body { margin: 1px; padding: 5px; }
|
||||||
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
||||||
</style>
|
</style>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
jQuery(function($) {
|
jQuery(function($) {
|
||||||
$('body').click(function() {
|
$('body').click(function() {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#forceScroll { width: 5000px; height: 5000px; }
|
#forceScroll { width: 5000px; height: 5000px; }
|
||||||
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
||||||
</style>
|
</style>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
jQuery(function($) {
|
jQuery(function($) {
|
||||||
window.scrollTo(1000,1000);
|
window.scrollTo(1000,1000);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#relative-2 { top: 20px; left: 20px; }
|
#relative-2 { top: 20px; left: 20px; }
|
||||||
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
||||||
</style>
|
</style>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
jQuery(function($) {
|
jQuery(function($) {
|
||||||
$('.relative').click(function() {
|
$('.relative').click(function() {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#forceScroll { width: 5000px; height: 5000px; }
|
#forceScroll { width: 5000px; height: 5000px; }
|
||||||
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
||||||
</style>
|
</style>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
jQuery(function($) {
|
jQuery(function($) {
|
||||||
window.scrollTo(1000,1000);
|
window.scrollTo(1000,1000);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#static-2 { top: 20px; left: 20px; }
|
#static-2 { top: 20px; left: 20px; }
|
||||||
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
||||||
</style>
|
</style>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
jQuery(function($) {
|
jQuery(function($) {
|
||||||
$('.static').click(function() {
|
$('.static').click(function() {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
th, td { border: 1px solid #000; width: 100px; height: 100px; }
|
th, td { border: 1px solid #000; width: 100px; height: 100px; }
|
||||||
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
|
||||||
</style>
|
</style>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
jQuery(function($) {
|
jQuery(function($) {
|
||||||
$('table, th, td').click(function() {
|
$('table, th, td').click(function() {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||||
<title>jQuery selector - attributes</title>
|
<title>jQuery selector - attributes</title>
|
||||||
|
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
|
|
||||||
<script id="script1"
|
<script id="script1"
|
||||||
defer
|
defer
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||||
<title>jQuery selector - sizzle cache</title>
|
<title>jQuery selector - sizzle cache</title>
|
||||||
|
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var $cached = jQuery.noConflict(true);
|
var $cached = jQuery.noConflict(true);
|
||||||
</script>
|
</script>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
jQuery(function() {
|
jQuery(function() {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
background: url('http://s1.postimage.org/2d2r8xih0/body_background.png');
|
background: url('http://s1.postimage.org/2d2r8xih0/body_background.png');
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script src="../include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Event Delegation Tests</title>
|
<title>Event Delegation Tests</title>
|
||||||
<script src="data/include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<style>
|
<style>
|
||||||
table {
|
table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Hover tests</title>
|
<title>Hover tests</title>
|
||||||
<script src="data/include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<style>
|
<style>
|
||||||
/* Remove body dimensions so we can test enter/leave to surrounding browser chrome */
|
/* Remove body dimensions so we can test enter/leave to surrounding browser chrome */
|
||||||
body, html {
|
body, html {
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
<link rel="Stylesheet" media="screen" href="qunit/qunit/qunit.css" />
|
<link rel="Stylesheet" media="screen" href="qunit/qunit/qunit.css" />
|
||||||
<link rel="Stylesheet" media="screen" href="data/testsuite.css" />
|
<link rel="Stylesheet" media="screen" href="data/testsuite.css" />
|
||||||
<!-- Includes -->
|
<!-- Includes -->
|
||||||
<script src="data/testinit.js"></script>
|
|
||||||
|
|
||||||
<script src="data/include_js.php"></script>
|
<script src="data/testinit.js"></script>
|
||||||
|
<script src="/dist/jquery.js"></script>
|
||||||
|
|
||||||
<script src="qunit/qunit/qunit.js"></script>
|
<script src="qunit/qunit/qunit.js"></script>
|
||||||
<script src="data/testrunner.js"></script>
|
<script src="data/testrunner.js"></script>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>jQuery Local File Test</title>
|
<title>jQuery Local File Test</title>
|
||||||
<!-- Includes -->
|
<!-- Includes -->
|
||||||
<script src="data/include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.error { color: red; }
|
.error { color: red; }
|
||||||
.success { color: green; }
|
.success { color: green; }
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<style>
|
<style>
|
||||||
div { margin-top: 10px; }
|
div { margin-top: 10px; }
|
||||||
</style>
|
</style>
|
||||||
<script src="data/include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('button').live('click', function () {
|
$('button').live('click', function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#output { background-color: green }
|
#output { background-color: green }
|
||||||
#expectedOutput { background-color: green }
|
#expectedOutput { background-color: green }
|
||||||
</style>
|
</style>
|
||||||
<script src="data/include_js.php"></script>
|
<script src="/dist/jquery.js"></script>
|
||||||
|
|
||||||
<!-- Load the script loader that uses
|
<!-- Load the script loader that uses
|
||||||
jQuery.readyWait -->
|
jQuery.readyWait -->
|
||||||
|
Loading…
Reference in New Issue
Block a user