Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated jQuery 1.4.2pre unit tests to 1.4.2, added 1.2.6, and switche…

…d tests and examples to use 1.4.2 by default
  • Loading branch information...
commit 2ec65fca379b9e55c29ec2ee95b18702250973c7 1 parent d262a79
@cowboy authored
View
2  README.markdown
@@ -24,7 +24,7 @@ tested with, what browsers it has been tested in, and where the unit tests
reside (so you can test it yourself).
### jQuery Versions ###
-1.3.2, 1.4.1, 1.4.2pre
+1.2.6, 1.3.2, 1.4.1, 1.4.2
### Browsers Tested ###
Internet Explorer 6-8, Firefox 2-3.7, Safari 3-4, Chrome, Opera 9.6-10.1.
View
2  docs/files/jquery-ba-hashchange-js.html
@@ -17,7 +17,7 @@
<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Examples"></a>Examples</h3><div class=CBody><p>This working example, complete with fully commented code, illustrate one way in which this plugin can be used.</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>hashchange event</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/examples<wbr>/hashchange<wbr>/</a></td></tr></table></div></div></div>
-<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Support_and_Testing"></a>Support and Testing</h3><div class=CBody><p>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>jQuery Versions</td><td class=CDLDescription>1.3.2, 1.4.1, 1.4.2pre</td></tr><tr><td class=CDLEntry>Browsers Tested</td><td class=CDLDescription>Internet Explorer 6-8, Firefox 2-3.7, Safari 3-4, Chrome, Opera 9.6-10.1.</td></tr><tr><td class=CDLEntry>Unit Tests</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/unit/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/unit<wbr>/</a></td></tr></table></div></div></div>
+<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Support_and_Testing"></a>Support and Testing</h3><div class=CBody><p>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>jQuery Versions</td><td class=CDLDescription>1.2.6, 1.3.2, 1.4.1, 1.4.2</td></tr><tr><td class=CDLEntry>Browsers Tested</td><td class=CDLDescription>Internet Explorer 6-8, Firefox 2-3.7, Safari 3-4, Chrome, Opera 9.6-10.1.</td></tr><tr><td class=CDLEntry>Unit Tests</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/unit/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/unit<wbr>/</a></td></tr></table></div></div></div>
<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Known_issues"></a>Known issues</h3><div class=CBody><p>While this jQuery hashchange event implementation is quite stable and robust, there are a few unfortunate browser bugs surrounding expected hashchange event-based behaviors, independent of any JavaScript window.onhashchange abstraction.&nbsp; See the following examples for more information:</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Chrome: Back Button</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/examples<wbr>/bug-chrome-back-button<wbr>/</a></td></tr><tr><td class=CDLEntry>Firefox: Remote XMLHttpRequest</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/examples<wbr>/bug-firefox-remote-xhr<wbr>/</a></td></tr><tr><td class=CDLEntry>WebKit: Back Button in an Iframe</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/examples<wbr>/bug-webkit-hash-iframe<wbr>/</a></td></tr><tr><td class=CDLEntry>Safari: Back Button from a different domain</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/examples<wbr>/bug-safari-back-from-diff-domain<wbr>/</a></td></tr></table></div></div></div>
View
BIN  docs/nd/Data/ConfigFileInfo.nd
Binary file not shown
View
4 docs/nd/Data/FileInfo.nd
@@ -1,4 +1,4 @@
1.4
JavaScript
-/srv/projects/jquery-hashchange/jquery.ba-hashchange.js 1265893781 1 jQuery hashchange event
-/srv/projects/jquery-hashchange/jquery.ba-hashchange.min.js 1265894139 0 /srv/projects/jquery-hashchange/jquery.ba-hashchange.min.js
+/srv/projects/jquery-hashchange/jquery.ba-hashchange.js 1268400937 1 jQuery hashchange event
+/srv/projects/jquery-hashchange/jquery.ba-hashchange.min.js 1268400955 0 /srv/projects/jquery-hashchange/jquery.ba-hashchange.min.js
View
BIN  docs/nd/Data/SymbolTable.nd
Binary file not shown
View
5 examples/config.php
@@ -12,9 +12,10 @@
$shell['h3'] = ob_get_contents();
ob_end_clean();
-//$shell['jquery'] = 'jquery-1.4.2pre.js';
-$shell['jquery'] = 'jquery-1.4.1.js';
+$shell['jquery'] = 'jquery-1.4.2.js';
+//$shell['jquery'] = 'jquery-1.4.1.js';
//$shell['jquery'] = 'jquery-1.3.2.js';
+//$shell['jquery'] = 'jquery-1.2.6.js';
$shell['shBrush'] = array( 'JScript' );
View
2  jquery.ba-hashchange.js
@@ -35,7 +35,7 @@
// tested with, what browsers it has been tested in, and where the unit tests
// reside (so you can test it yourself).
//
-// jQuery Versions - 1.3.2, 1.4.1, 1.4.2pre
+// jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.7, Safari 3-4, Chrome, Opera 9.6-10.1.
// Unit Tests - http://benalman.com/code/projects/jquery-hashchange/unit/
//
View
3,549 shared/jquery-1.2.6.js
3,549 additions, 0 deletions not shown
View
198 shared/jquery-1.4.2pre.js → shared/jquery-1.4.2.js
@@ -1,5 +1,5 @@
/*!
- * jQuery JavaScript Library v1.4.2pre
+ * jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
@@ -11,7 +11,7 @@
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
- * Date: Thu Feb 11 01:42:51 2010 -0500
+ * Date: Sat Feb 13 22:33:48 2010 -0500
*/
(function( window, undefined ) {
@@ -184,7 +184,7 @@ jQuery.fn = jQuery.prototype = {
selector: "",
// The current version of jQuery being used
- jquery: "1.4.2pre",
+ jquery: "1.4.2",
// The default length of a jQuery object is 0
length: 0,
@@ -214,7 +214,14 @@ jQuery.fn = jQuery.prototype = {
// (returning the new matched element set)
pushStack: function( elems, name, selector ) {
// Build a new jQuery matched element set
- var ret = jQuery( elems || null );
+ var ret = jQuery();
+
+ if ( jQuery.isArray( elems ) ) {
+ push.apply( ret, elems );
+
+ } else {
+ jQuery.merge( ret, elems );
+ }
// Add the old object onto the stack (as a reference)
ret.prevObject = this;
@@ -231,18 +238,6 @@ jQuery.fn = jQuery.prototype = {
return ret;
},
- // Force the current matched set of elements to become
- // the specified array of elements (destroying the stack in the process)
- // You should use pushStack() in order to do this, but maintain the stack
- setArray: function( elems ) {
- // Resetting the length to 0, then using the native Array push
- // is a super-fast way to populate an object with array-like properties
- this.length = 0;
- push.apply( this, elems );
-
- return this;
- },
-
// Execute a callback for every element in the matched set.
// (You can seed the arguments with an array of args, but this is
// only used internally.)
@@ -502,6 +497,9 @@ jQuery.extend({
if ( typeof data !== "string" || !data ) {
return null;
}
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
@@ -818,7 +816,7 @@ function access( elems, key, value, exec, fn, pass ) {
}
// Getting an attribute
- return length ? fn( elems[0], key ) : null;
+ return length ? fn( elems[0], key ) : undefined;
}
function now() {
@@ -882,7 +880,10 @@ function now() {
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
+ parentNode: div.removeChild( div.appendChild( document.createElement("div") ) ).parentNode === null,
+
// Will be defined later
+ deleteExpando: true,
checkClone: false,
scriptEval: false,
noCloneEvent: true,
@@ -904,6 +905,15 @@ function now() {
delete window[ id ];
}
+ // Test to see if it's possible to delete an expando from an element
+ // Fails in Internet Explorer
+ try {
+ delete script.test;
+
+ } catch(e) {
+ jQuery.support.deleteExpando = false;
+ }
+
root.removeChild( script );
if ( div.attachEvent && div.fireEvent ) {
@@ -934,6 +944,7 @@ function now() {
document.body.appendChild( div );
jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
document.body.removeChild( div ).style.display = 'none';
+
div = null;
});
@@ -1053,15 +1064,11 @@ jQuery.extend({
// Otherwise, we want to remove all of the element's data
} else {
- // Clean up the element expando
- try {
- delete elem[ expando ];
- } catch( e ) {
- // IE has trouble directly removing the expando
- // but it's ok with using removeAttribute
- if ( elem.removeAttribute ) {
- elem.removeAttribute( expando );
- }
+ if ( jQuery.support.deleteExpando ) {
+ delete elem[ jQuery.expando ];
+
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( jQuery.expando );
}
// Completely remove the data cache
@@ -1106,25 +1113,7 @@ jQuery.fn.extend({
});
}
});
-
-var removeExpando = function( elem ) {
- delete elem[ expando ];
-};
-
-try {
- var div = document.createElement("div");
- div[ expando ] = true;
- delete div[ expando ];
-
-} catch( e ) {
- // IE has trouble directly removing the expando
- // but it's ok with using removeAttribute
- removeExpando = function( elem ) {
- if ( elem.removeAttribute ) {
- elem.removeAttribute( expando );
- }
- };
-}jQuery.extend({
+jQuery.extend({
queue: function( elem, type, data ) {
if ( !elem ) {
return;
@@ -1256,12 +1245,13 @@ jQuery.fn.extend({
elem.className = value;
} else {
- var className = " " + elem.className + " ";
+ var className = " " + elem.className + " ", setClass = elem.className;
for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
- elem.className += " " + classNames[c];
+ setClass += " " + classNames[c];
}
}
+ elem.className = jQuery.trim( setClass );
}
}
}
@@ -1664,6 +1654,10 @@ jQuery.event = {
if ( special.add ) {
special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
}
// Add the function to the element's handler list
@@ -2156,27 +2150,24 @@ var withinElement = function( event ) {
// Check if mouse(over|out) are still within the same parent element
var parent = event.relatedTarget;
- // Traverse up the tree
- while ( parent && parent !== this ) {
- // Firefox sometimes assigns relatedTarget a XUL element
- // which we cannot access the parentNode property of
- try {
+ // Firefox sometimes assigns relatedTarget a XUL element
+ // which we cannot access the parentNode property of
+ try {
+ // Traverse up the tree
+ while ( parent && parent !== this ) {
parent = parent.parentNode;
-
- // assuming we've left the element since we most likely mousedover a xul element
- } catch(e) {
- break;
}
- }
- if ( parent !== this ) {
- // set the correct event type
- event.type = event.data;
+ if ( parent !== this ) {
+ // set the correct event type
+ event.type = event.data;
- // handle event if we actually just moused on to a non sub-element
- jQuery.event.handle.apply( this, arguments );
- }
+ // handle event if we actually just moused on to a non sub-element
+ jQuery.event.handle.apply( this, arguments );
+ }
+ // assuming we've left the element since we most likely mousedover a xul element
+ } catch(e) { }
},
// In case of event delegation, we only need to rename the event.type,
@@ -2321,6 +2312,10 @@ if ( !jQuery.support.changeBubbles ) {
},
setup: function( data, namespaces ) {
+ if ( this.type === "file" ) {
+ return false;
+ }
+
for ( var type in changeFilters ) {
jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
}
@@ -2469,9 +2464,16 @@ jQuery.fn.extend({
}
});
+var liveMap = {
+ focus: "focusin",
+ blur: "focusout",
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+};
+
jQuery.each(["live", "die"], function( i, name ) {
jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
- var type, i = 0, match, namespaces,
+ var type, i = 0, match, namespaces, preType,
selector = origSelector || this.selector,
context = origSelector ? this : jQuery( this.context );
@@ -2491,18 +2493,26 @@ jQuery.each(["live", "die"], function( i, name ) {
type = type.replace( rnamespaces, "" );
}
- type = type === "focus" ? "focusin" : // focus --> focusin
- type === "blur" ? "focusout" : // blur --> focusout
- type === "hover" ? types.push("mouseleave" + namespaces) && "mouseenter" : // hover support
- type;
+ if ( type === "hover" ) {
+ types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
+ continue;
+ }
+
+ preType = type;
- type += namespaces;
+ if ( type === "focus" || type === "blur" ) {
+ types.push( liveMap[ type ] + namespaces );
+ type = type + namespaces;
+
+ } else {
+ type = (liveMap[ type ] || type) + namespaces;
+ }
if ( name === "live" ) {
// bind live handler
context.each(function(){
jQuery.event.add( this, liveConvert( type, selector ),
- { data: data, selector: selector, handler: fn, origType: type, origHandler: fn } );
+ { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
});
} else {
@@ -2521,7 +2531,7 @@ function liveHandler( event ) {
events = jQuery.data( this, "events" );
// Make sure we avoid non-left-click bubbling in Firefox (#3861)
- if ( event.liveFired === this || !events || event.button && event.type === "click" ) {
+ if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
return;
}
@@ -2551,7 +2561,7 @@ function liveHandler( event ) {
related = null;
// Those two events require additional checking
- if ( handleObj.origType === "mouseenter" || handleObj.origType === "mouseleave" ) {
+ if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
}
@@ -3323,8 +3333,10 @@ var makeArray = function(array, results) {
// Perform a simple check to determine if the browser is capable of
// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
try {
- Array.prototype.slice.call( document.documentElement.childNodes, 0 );
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
// Provide a fallback method if it does not work
} catch(e){
@@ -3665,7 +3677,7 @@ jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.filters;
jQuery.unique = Sizzle.uniqueSort;
-jQuery.getText = getText;
+jQuery.text = getText;
jQuery.isXMLDoc = isXML;
jQuery.contains = contains;
@@ -3952,7 +3964,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rtagName = /<([\w:]+)/,
rtbody = /<tbody/i,
rhtml = /<|&#?\w+;/,
- rnocache = /<script|<object|<embed/i,
+ rnocache = /<script|<object|<embed|<option|<style/i,
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // checked="checked" or checked (html5)
fcloseTag = function( all, front, tag ) {
return rselfClosing.test( tag ) ?
@@ -3992,7 +4004,7 @@ jQuery.fn.extend({
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
}
- return jQuery.getText( this );
+ return jQuery.text( this );
},
wrapAll: function( html ) {
@@ -4247,7 +4259,7 @@ jQuery.fn.extend({
},
domManip: function( args, table, callback ) {
- var results, first, value = args[0], scripts = [], fragment;
+ var results, first, value = args[0], scripts = [], fragment, parent;
// We can't cloneNode fragments that contain checked, in WebKit
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
@@ -4265,9 +4277,12 @@ jQuery.fn.extend({
}
if ( this[0] ) {
+ parent = value && value.parentNode;
+
// If we're in a fragment, just use that instead of building a new one
- if ( args[0] && args[0].parentNode && args[0].parentNode.nodeType === 11 ) {
- results = { fragment: args[0].parentNode };
+ if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+ results = { fragment: parent };
+
} else {
results = buildFragment( args, this, scripts );
}
@@ -4376,9 +4391,10 @@ jQuery.each({
replaceAll: "replaceWith"
}, function( name, original ) {
jQuery.fn[ name ] = function( selector ) {
- var ret = [], insert = jQuery( selector );
+ var ret = [], insert = jQuery( selector ),
+ parent = this.length === 1 && this[0].parentNode;
- if ( this.length === 1 && this[0].parentNode && this[0].parentNode.nodeType === 11 && insert.length === 1 ) {
+ if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
insert[ original ]( this[0] );
return this;
@@ -4490,7 +4506,9 @@ jQuery.extend({
},
cleanData: function( elems ) {
- var data, id, cache = jQuery.cache;
+ var data, id, cache = jQuery.cache,
+ special = jQuery.event.special,
+ deleteExpando = jQuery.support.deleteExpando;
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
id = elem[ jQuery.expando ];
@@ -4499,12 +4517,22 @@ jQuery.extend({
data = cache[ id ];
if ( data.events ) {
- for ( var event in data.events ) {
- removeEvent( elem, event, data.handle );
+ for ( var type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ } else {
+ removeEvent( elem, type, data.handle );
+ }
}
}
- removeExpando( elem );
+ if ( deleteExpando ) {
+ delete elem[ jQuery.expando ];
+
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( jQuery.expando );
+ }
delete cache[ id ];
}
View
7 unit/ie7-compat.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="qunit.css" type="text/css" media="screen">
<script type="text/javascript" src="../shared/qunit.js"></script>
- <script type="text/javascript" src="../shared/jquery-1.4.1.js"></script>
+ <script type="text/javascript" src="../shared/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../jquery.ba-hashchange.js"></script>
<script type="text/javascript" src="unit.js"></script>
@@ -22,8 +22,9 @@ <h2 id="qunit-banner"><span></span></h2>
<h2 id="qunit-userAgent"></h2>
<p>
These unit tests include jQuery <span id="jq_version">...</span>. To view the unit tests using
- jQuery 1.4.2pre, <a href="./jquery-1.4.2.html">click here</a>, and to view the unit tests using
- jQuery 1.3.2, <a href="./jquery-1.3.2.html">click here</a>.
+ jQuery 1.4.1, <a href="./jquery-1.4.1.html">click here</a>, to view the unit tests using
+ jQuery 1.3.2, <a href="./jquery-1.3.2.html">click here</a>, and to view the unit tests using
+ jQuery 1.2.6, <a href="./jquery-1.2.6.html">click here</a>.
<br><i>This page uses &lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"&gt; (IE8).</i>
</p>
<ol id="qunit-tests"></ol>
View
7 unit/index.html
@@ -5,7 +5,7 @@
<link rel="stylesheet" href="qunit.css" type="text/css" media="screen">
<script type="text/javascript" src="../shared/qunit.js"></script>
- <script type="text/javascript" src="../shared/jquery-1.4.1.js"></script>
+ <script type="text/javascript" src="../shared/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../jquery.ba-hashchange.js"></script>
<script type="text/javascript" src="unit.js"></script>
@@ -21,8 +21,9 @@ <h2 id="qunit-banner"><span></span></h2>
<h2 id="qunit-userAgent"></h2>
<p>
These unit tests include jQuery <span id="jq_version">...</span>. To view the unit tests using
- jQuery 1.4.2pre, <a href="./jquery-1.4.2.html">click here</a>, and to view the unit tests using
- jQuery 1.3.2, <a href="./jquery-1.3.2.html">click here</a>.
+ jQuery 1.4.1, <a href="./jquery-1.4.1.html">click here</a>, to view the unit tests using
+ jQuery 1.3.2, <a href="./jquery-1.3.2.html">click here</a>, and to view the unit tests using
+ jQuery 1.2.6, <a href="./jquery-1.2.6.html">click here</a>.
<br>To view a unit test page using &lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"&gt; <a href="./ie7-compat.html">click here</a> (IE8).
</p>
<ol id="qunit-tests"></ol>
View
32 unit/jquery-1.2.6.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>jQuery hashchange event - Unit Tests</title>
+ <link rel="stylesheet" href="qunit.css" type="text/css" media="screen">
+ <script type="text/javascript" src="../shared/qunit.js"></script>
+
+ <script type="text/javascript" src="../shared/jquery-1.2.6.js"></script>
+
+ <script type="text/javascript" src="../jquery.ba-hashchange.js"></script>
+ <script type="text/javascript" src="unit.js"></script>
+</head>
+<body>
+ <div id="qunit-header">
+ <h1>jQuery hashchange event - Unit Tests</h1>
+ <small><a href="http://benalman.com/projects/jquery-hashchange-plugin/">Project Home</a></small>
+ <div style="clear:both"></div>
+ </div>
+ <h2 id="qunit-banner"><span></span></h2>
+ <div id="qunit-testrunner-toolbar"></div>
+ <h2 id="qunit-userAgent"></h2>
+ <p>
+ These unit tests include jQuery <span id="jq_version">...</span>. To view the unit tests using
+ jQuery 1.4.2, <a href="./">click here</a>, to view the unit tests using
+ jQuery 1.4.1, <a href="./jquery-1.4.1.html">click here</a>, and to view the unit tests using
+ jQuery 1.3.2, <a href="./jquery-1.3.2.html">click here</a>.
+ <br>To view a unit test page using &lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"&gt; <a href="./ie7-compat.html">click here</a> (IE8).
+ </p>
+ <ol id="qunit-tests"></ol>
+ <div style="height:2000px"></div><!-- make sure the page doesn't scroll when the event is first bound -->
+</body>
+</html>
View
5 unit/jquery-1.3.2.html
@@ -21,8 +21,9 @@ <h2 id="qunit-banner"><span></span></h2>
<h2 id="qunit-userAgent"></h2>
<p>
These unit tests include jQuery <span id="jq_version">...</span>. To view the unit tests using
- jQuery 1.4.1, <a href="./">click here</a>, and to view the unit tests using
- jQuery 1.4.2pre, <a href="./jquery-1.4.2.html">click here</a>.
+ jQuery 1.2.6, <a href="./jquery-1.2.6.html">click here</a>, to view the unit tests using
+ jQuery 1.4.2, <a href="./">click here</a>, and to view the unit tests using
+ jQuery 1.4.1, <a href="./jquery-1.4.1.html">click here</a>.
<br>To view a unit test page using &lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"&gt; <a href="./ie7-compat.html">click here</a> (IE8).
</p>
<ol id="qunit-tests"></ol>
View
7 unit/jquery-1.4.2.html → unit/jquery-1.4.1.html
@@ -5,7 +5,7 @@
<link rel="stylesheet" href="qunit.css" type="text/css" media="screen">
<script type="text/javascript" src="../shared/qunit.js"></script>
- <script type="text/javascript" src="../shared/jquery-1.4.2pre.js"></script>
+ <script type="text/javascript" src="../shared/jquery-1.4.1.js"></script>
<script type="text/javascript" src="../jquery.ba-hashchange.js"></script>
<script type="text/javascript" src="unit.js"></script>
@@ -21,8 +21,9 @@ <h2 id="qunit-banner"><span></span></h2>
<h2 id="qunit-userAgent"></h2>
<p>
These unit tests include jQuery <span id="jq_version">...</span>. To view the unit tests using
- jQuery 1.3.2, <a href="./jquery-1.3.2.html">click here</a>, and to view the unit tests using
- jQuery 1.4.1, <a href="./">click here</a>
+ jQuery 1.3.2, <a href="./jquery-1.3.2.html">click here</a>, to view the unit tests using
+ jQuery 1.2.6, <a href="./jquery-1.2.6.html">click here</a>, and to view the unit tests using
+ jQuery 1.4.2, <a href="./">click here</a>.
<br>To view a unit test page using &lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"&gt; <a href="./ie7-compat.html">click here</a> (IE8).
</p>
<ol id="qunit-tests"></ol>
View
2  unit/unit.js
@@ -22,7 +22,7 @@ function run_many_tests() {
result;
function set_result( i, test ) {
- result = $.isArray( test )
+ result = {}.toString.call( test ) === '[object Array]' // 1.2.6 didn't have $.toArray()
? func_each.apply( this, test )
: $.isFunction( test )
? test( result )
Please sign in to comment.
Something went wrong with that request. Please try again.