Changing The Z-index Of A Div When A Function Is Called?
When createCustomerCard('CUST_0') is called it opens the first order card below
Solution 1:
Add to style position:relative
says @Mr Lister or position:absolute
:
<divid="CUST_0"class="widgetui-dialogui-widgetui-widget-contentui-corner-allui-draggable"style="width:500px;height:auto;font-size:11px;display:block;left:29px;top:156px;position:relative;z-index:1013;">
and add jQuery where is the function called:
$('#CUST_N').css("z-index", $('#CUST_N').css("z-index")+1);
Solution 2:
Does the div have a position
other than static
? Only positioned elements can use z-indexes. So give it position:relative
and it might just work.
By the way, why z-index:1013
? What's special about that number?
Solution 3:
This should increase the z-index by 1:
$('#CUST_N').css("z-index", "+=1");
Post a Comment for "Changing The Z-index Of A Div When A Function Is Called?"