Can't change z-index with JQuery

后端 未结 5 1418
别跟我提以往
别跟我提以往 2020-12-10 10:29

I, for some reason, can\'t change the zIndex of an element using jQuery. I\'ve searched all of this website and Google but couldn\'t find the right answer. I am trying to

5条回答
  •  一整个雨季
    2020-12-10 10:46

    zIndex is part of javaScript notation.(camelCase)
    but jQuery.css uses same as CSS syntax.
    so it is z-index.

    you forgot .css("attr","value"). use ' or " in both, attr and val. so, .css("z-index","3000");

提交回复
热议问题