forked from 0x2620/oxjs
add .data method to Ox.$, use in Ox.UI.getOxElement, don't use .attr in Ox.JQueryElement
This commit is contained in:
parent
94b5c5307d
commit
6acd99d74f
3 changed files with 18 additions and 5 deletions
|
|
@ -9,9 +9,7 @@ Ox.JQueryElement = function($element) {
|
|||
//@ id <n> Unique id
|
||||
this.oxid = Ox.uid();
|
||||
//@ $element <o> The jQuery-wrapped DOM element
|
||||
this.$element = $element
|
||||
.attr({'data-oxid': this.oxid})
|
||||
.data({oxid: this.oxid});
|
||||
this.$element = $element.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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue