github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jquery / jquery

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 2,066
    • 197
  • Source
  • Commits
  • Network (197)
  • Graphs
  • Tree: 8e53f7b

click here to add a description

click here to add a homepage

  • Switch Branches (3)
    • master
    • mobile
    • omgrequire
  • Switch Tags (41)
    • 1.4rc1
    • 1.4a2
    • 1.4a1
    • 1.4.2
    • 1.4.1
    • 1.4
    • 1.3rc1
    • 1.3b2
    • 1.3b1
    • 1.3.2
    • 1.3.1rc1
    • 1.3.1
    • 1.3
    • 1.2.6
    • 1.2.5
    • 1.2.4b
    • 1.2.4a
    • 1.2.4
    • 1.2.3b
    • 1.2.3a
    • 1.2.3
    • 1.2.2b2
    • 1.2.2b
    • 1.2.2
    • 1.2.1
    • 1.2
    • 1.1b
    • 1.1a
    • 1.1.4
    • 1.1.3a
    • 1.1.3.1
    • 1.1.3
    • 1.1.2
    • 1.1.1
    • 1.1
    • 1.0a
    • 1.0.4
    • 1.0.3
    • 1.0.2
    • 1.0.1
    • 1.0
  • Comments
Sending Request…

jQuery JavaScript Library — Read more

  Cancel

http://jquery.com/

  Cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Fixed typo in  logic, also disabled function setters in this case to allow 
the functions to passthrough and bind.
jeresig (author)
Tue Jan 12 18:54:06 -0800 2010
commit  8e53f7b5d6716e60d8c8ea7e167f2b187aae9d89
tree    e70c4035fdbaf65f782f3a0654c02cbffe9e9f23
parent  b5f077ae6af6d644c5ae58ba9fd79a08dc58ba1e
M Makefile 2 ••
M build.xml 2 ••
M src/core.js 2 ••
M src/event.js 4 ••••
M test/unit/core.js 8 ••••
Txt Makefile
  • View file @ 8e53f7b
... ...
@@ -8,10 +8,10 @@ BASE_FILES = ${SRC_DIR}/core.js\
8 8
   ${SRC_DIR}/support.js\
9 9
   ${SRC_DIR}/data.js\
10 10
   ${SRC_DIR}/queue.js\
  11
+  ${SRC_DIR}/attributes.js\
11 12
   ${SRC_DIR}/event.js\
12 13
   ${SRC_DIR}/selector.js\
13 14
   ${SRC_DIR}/traversing.js\
14  
-  ${SRC_DIR}/attributes.js\
15 15
   ${SRC_DIR}/manipulation.js\
16 16
   ${SRC_DIR}/css.js\
17 17
   ${SRC_DIR}/ajax.js\
Txt build.xml
  • View file @ 8e53f7b
... ...
@@ -47,10 +47,10 @@
47 47
             <fileset file="src/support.js" />
48 48
             <fileset file="src/data.js" />
49 49
             <fileset file="src/queue.js" />
  50
+            <fileset file="src/attributes.js" />
50 51
             <fileset file="src/event.js" />
51 52
             <fileset file="src/selector.js" />
52 53
             <fileset file="src/traversing.js" />
53  
-            <fileset file="src/attributes.js" />
54 54
             <fileset file="src/manipulation.js" />
55 55
             <fileset file="src/css.js" />
56 56
             <fileset file="src/ajax.js" />
Txt src/core.js
  • View file @ 8e53f7b
... ...
@@ -772,7 +772,7 @@ function access( elems, key, value, exec, fn, pass ) {
772 772
   // Setting one attribute
773 773
   if ( value !== undefined ) {
774 774
     // Optionally, function values get executed if exec is true
775  
-    exec = exec && jQuery.isFunction(value);
  775
+    exec = !pass && exec && jQuery.isFunction(value);
776 776
     
777 777
     for ( var i = 0; i < length; i++ ) {
778 778
       fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
Txt src/event.js
  • View file @ 8e53f7b
... ...
@@ -919,8 +919,8 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
919 919
     return fn ? this.bind( name, fn ) : this.trigger( name );
920 920
   };
921 921
 
922  
-  if ( jQuery.fnAttr ) {
923  
-    jQuery.fnAttr[ name ] = true;
  922
+  if ( jQuery.attrFn ) {
  923
+    jQuery.attrFn[ name ] = true;
924 924
   }
925 925
 });
926 926
 
Txt test/unit/core.js
  • View file @ 8e53f7b
... ...
@@ -12,7 +12,7 @@ test("Basic requirements", function() {
12 12
 });
13 13
 
14 14
 test("jQuery()", function() {
15  
-  expect(22);
  15
+  expect(23);
16 16
 
17 17
   // Basic constructor's behavior
18 18
 
... ...
@@ -63,9 +63,12 @@ test("jQuery()", function() {
63 63
 
64 64
   equals( jQuery(document.body).get(0), jQuery('body').get(0), "Test passing an html node to the factory" );
65 65
 
  66
+  var exec = false;
  67
+
66 68
   var elem = jQuery("<div/>", {
67 69
     width: 10,
68 70
     css: { paddingLeft:1, paddingRight:1 },
  71
+    click: function(){ ok(exec, "Click executed."); },
69 72
     text: "test",
70 73
     "class": "test2",
71 74
     id: "test3"
... ...
@@ -78,6 +81,9 @@ test("jQuery()", function() {
78 81
   equals( elem[0].firstChild.nodeValue, "test", 'jQuery quick setter text');
79 82
   equals( elem[0].className, "test2", 'jQuery() quick setter class');
80 83
   equals( elem[0].id, "test3", 'jQuery() quick setter id');
  84
+
  85
+  exec = true;
  86
+  elem.click();
81 87
 });
82 88
 
83 89
 test("selector state", function() {

0 notes on commit 8e53f7b

Please log in to comment.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server