I am trying to write my own little modal popup script and it's working fine in FF but not in IE7. In IE7 the modal layer shows up on top of the content I want displayed even though I believe I have the Z- Indexes set properly.
Anyone run into this an know how to overcome it? I know there are other pre-written solutions out there but I wanted to create my own. Here is my code so far, I know it is rough - plan on cleaning it up once I get the functionality working: $(document).ready(function(){ setupPopup('linkSuggest'); function setupPopup(id) { var lnk= $('.'+id); var div = $("div[title='" + id + "']"); div.attr("class","alivePopupHidden"); div.prepend("<div class='alivePopupHeader'><a href='#' class='aliveCancelButton'>[x] cancel / close window</a></div><br clear='all'/>"); // Add Cancel Link var cancelLnk=$("div[title='" + id + "'] .aliveCancelButton"); // Find cancel link cancelLnk.click(function(){hideAllPopups();return false;}); //Add close behavior lnk.bind("click", function(e){ hideAllPopups(); div.attr("class","alivePopupVisible"); $('#< %=txtCurrentSuppliment.ClientID %>').attr('value',this.title); $('#< %=hiddenCurrentSupplimentID.ClientID %>').attr('value',this.id); $('body').append("<div id='overlay'></div>"); div.css("z-index","999"); return false;}) //Add open behavior } function hideAllPopups() {$('div#overlay').remove();$ ('.alivePopupVisible').attr("class","alivePopupHidden"); } //Hide all other popup windows }); html --------------- <div title="linkSuggest"> <p>content goes here</p> </div>