tags:

views:

29

answers:

1

Is there a way to delete properties of DOM elements? I'm using a widget that upon rendering itself adds tabindex attributes to certain nodes. I'd like to remove them because they cause unwanted visual changes.

I tried the following which does not seem to have any effect (tabindex stays the same):

delete domNode.tabIndex;
domNode.tabIndex = undefined;
+1  A: 

As I recall, you can use the removeAttribute method. So, in your case:

[DomElement].removeAttribute('tabindex');

should do the trick.

KooiInc