Bug Tracker

Ticket #2768: 2768-data_from_hash.diff

File 2768-data_from_hash.diff, 394 bytes (added by Morgan, 8 months ago)

add data from hash

  • src/core.js

     
    458458    }, 
    459459 
    460460    data: function( key, value ){ 
     461        if(typeof key == "object") 
     462        { 
     463          for(k in key) 
     464            $(this).data(k,key[k]); 
     465          return this; 
     466        } 
     467 
    461468        var parts = key.split("."); 
    462469        parts[1] = parts[1] ? "." + parts[1] : "";