The current js checks if there is any other elements with class ".modal.in" and sets the z-index to be on top of this one but if there are other elements with higher z-indexes it remains on "z-index:1".
That's the function. I would remove it and leave it using a high z-index set via CSS or check all elements and setup the z-index to be on top of all of them or at set the "highest" value to something bigger.
// Make sure it's always the top zindex
var highest = current = 0;
$('.modal.in').not('#'+id).each(function() {
current = parseInt($(this).css('z-index'), 10);
if(current > highest) {
highest = current
}
});
modal.css('z-index', parseInt(highest) + 1);
The current js checks if there is any other elements with class ".modal.in" and sets the z-index to be on top of this one but if there are other elements with higher z-indexes it remains on "z-index:1".
That's the function. I would remove it and leave it using a high z-index set via CSS or check all elements and setup the z-index to be on top of all of them or at set the "highest" value to something bigger.