javascript - How to add 'important' to zIndex -
i have conflict between add-ons on site. using firebug, noticed if add "!important" z-index can avoid conflict.
but z-index value set using javascript , not css
so how add "!important" following js code:
this.menu = $("<ul>") .addclass("ui-autocomplete") .appendto(this.document.find(this.options.appendto || "body")[0]) .zindex(this.element.zindex() + 1) // !! <- here // !! .hide() .data("menu");
edit: proposed answer [how apply !important using .css()? ] understand need add following code -
if (xxx.style.setproperty) { // ie 9- not support... xxx.style.setproperty ("z-index", (this???.element.zindex() + 1), "important"); }
how add it: xxx in case? , "this" ?
edit 2: since became jquery syntax question, asked different tags in - how add 'if' jquery chain code
i think got this
this.menu = $("<ul>") .addclass("ui-autocomplete") .appendto(this.document.find(this.options.appendto || "body")[0]) // .zindex(this.element.zindex() + 1) // !! <- here // !! .style.setproperty ("zindex", zindex()+1, "important"); .hide() .data("menu");
Comments
Post a Comment