Skip to content

Instantly share code, notes, and snippets.

@xoan
Created June 13, 2012 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xoan/2925337 to your computer and use it in GitHub Desktop.
Save xoan/2925337 to your computer and use it in GitHub Desktop.
Add data attribute support to xui.js
xui.extend({
data: function(attribute, val) {
if (arguments.length == 2) {
return this.attr(attribute, val);
} else {
return this.attr(attribute);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment