Z-Index Problem
| Project: | jNice, styled forms |
| Version: | 0.2.2-beta |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Hi,
I experienced a problem with the select boxes. When I had two forms stacked on top of eachother, and they both used select boxes, the select boxes for the bottom for were displaying on top of the select boxes from the top form. Here is what I did to fix it:
At the top of your .js file:
var lastZIndex = 1000;
Then change this code:
var $wrapper = $(this).parent().css({zIndex: 100-index});
To this code:
var $wrapper = $(this).parent().css({zIndex: lastZIndex});
lastZIndex -= 10;