Skip to content

Commit

Permalink
sync documentation - fix #298
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeetienne committed Jun 4, 2013
1 parent 250033c commit d239916
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/tquery.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ tQuery.VERSION = "r58.0";
* @param {Object} object the object in which store the data
* @param {String} key the key/name of the data to get/set
* @param {*} value the value to set (optional)
* @param {Boolean} mustNotExist if true, ensure that the key doesnt already exist, optional default to false
* @param {Boolean} mustNotExist if true, ensure that the key doesnt already exist, optional default to true
*
* @returns {*} return the value stored in this object for this key
*/
Expand Down
7 changes: 5 additions & 2 deletions js/tquery.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,16 @@ tQuery.Node.prototype.back = function(value)

/**
* same as .data() in jquery
* @param {String} key the key/name of the data to get/set
* @param {*} value the value to set (optional)
* @param {Boolean} mustNotExist if true, ensure that the key doesnt already exist, optional default to true
*/
tQuery.Node.prototype.data = function(key, value)
tQuery.Node.prototype.data = function(key, value, mustNotExist)
{
// handle the setter case
if( value !== undefined ){
this.each(function(element){
tQuery.data(element, key, value);
tQuery.data(element, key, value, mustNotExist);
});
return this; // for chained API
}
Expand Down

0 comments on commit d239916

Please sign in to comment.