add data-oxid attribute

This commit is contained in:
rolux 2013-12-06 20:56:11 +01:00
parent 27d8a6682e
commit 335c374b73

View file

@ -9,7 +9,9 @@ Ox.JQueryElement = function($element) {
//@ id <n> Unique id
this.oxid = Ox.uid();
//@ $element <o> The jQuery-wrapped DOM element
this.$element = $element.data({oxid: this.oxid});
this.$element = $element
.attr({'data-oxid': this.oxid})
.data({oxid: this.oxid});
//@ 0 <h> The DOM element (for compatibility with jQuery)
this[0] = this.$element[0];
//@ length <n> 1 (for compatibility with jQuery)