• John Resig's avatar
    Landing the new expando management code. Completely overhauls how data is associated with elements. · 3a4e1233
    John Resig authored
    Plugins will be most interested in:
    - jQuery.data(elem) -> Unique ID for the element
    - jQuery.data(elem, name) -> Named data store for the element
    - jQuery.data(elem, name, value) -> Saves a value to the named data store
    - jQuery.removeData(elem) -> Remove the expando and the complete data store
    - jQuery.removeData(elem, name) -> Removes just this one named data store
    
    jQuery's .remove() and .empty() automatically clean up after themselves. Once an element leaves a DOM document their events are no longer intact. Thus, statements like so:
    {{{
      $("#foo").remove().appendTo("#bar");
    }}}
    should be written like so:
    {{{
      $("#foo").appendTo("#bar");
    }}}
    in order to avoid losing the bound events.
    
    3a4e1233
Name
Last commit
Last update
..
cow.jpg Loading commit data...
dashboard.xml Loading commit data...
json.php Loading commit data...
json_obj.js Loading commit data...
jsonp.php Loading commit data...
name.html Loading commit data...
name.php Loading commit data...
test.html Loading commit data...
test.js Loading commit data...
test.php Loading commit data...
test2.html Loading commit data...
test3.html Loading commit data...
testrunner.js Loading commit data...
testsuite.css Loading commit data...
text.php Loading commit data...
with_fries.xml Loading commit data...