z index - How to add 'if' to jQuery chain code -


i need replace 4th line in -

this.menu = $("<ul>")    .addclass("ui-autocomplete")    .appendto(this.document.find(this.options.appendto || "body")[0])    .zindex(this.element.zindex() + 1)  // !! <- here // !!    .hide()    .data("menu"); 

with following code -

if (xxx.style.setproperty) {  // ie 9- not support...     xxx.style.setproperty ("z-index", (this???.element.zindex() + 1), "important");   } 
  • how merge code?
  • what 'xxx' in case?
  • what "this" ?

[relates how add 'important' zindex ]

this should it:

this.menu = $("<ul>")   .addclass("ui-autocomplete")   .appendto(this.document.find(this.options.appendto || "body")[0])   .each(function() {     this.style.csstext+= 'z-index: '+(parseint($(this).css('z-index'))+1)+' !important';   })   .hide()   .data("menu"); 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -