Xui.js parent object

206 views Asked by At

Xui.js doesn't support .parent() by itself, though it can use x$(this)[0].parentNode to access it, however that returns the literal DOM object it seems. Anyone with xui experience mind telling me how I can convert it into a xui object, so that I can then use functions (addClass/removeClass) on it?

1

There are 1 answers

0
graham On

You can by extending XUI, try:

var extendXUI = {
  parent : function () {
    return x$(this[0].parentNode);
  }
}
xui.extend(extendXUI);