I have conflict between some add-ons on my site. Using Firebug, I noticed that if I add "!important" to the z-index I can avoid the conflict.
but the z-index value is set using JavaScript and not CSS
so how do I add "!important" to the 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: from the proposed answer [How to apply !important using .css()? ] I understand that I need to add the following code -
if (XXX.style.setProperty) { // IE 9- does not support...
XXX.style.setProperty ("z-index", (this???.element.zIndex() + 1), "important");
}
How do I add it: what is XXX in my case? and "this" ?
Edit 2: Since it became jQuery syntax question, I asked it with different tags in - How to add 'if' to jQuery chain code