Popup like WEB2.0

Popup like WEB2.0

Hello,

i create with JQuery an overlay popup:

  1. $("body")
    .append('<div id="cl-entry-layer" style="position: absolute; top: 0; left: 0; z-index: 10;"></div><div id="cl-entry-wrap" style="position: absolute; width: 100%; top: 0; left: 0; z-index: 20;"><div id="cl-entry" style="position: relative; z-index: 91;padding: 20px; margin: 0 auto; margin-top: 20px; width: 600px; background-color: #fff; border: 1px black solid;"></div></div>');
Now i try an click event to close the overlay:

  1. $("#cl-entry-layer, #cl-entry-wrap").click( function(){
      _finish();
    });
    $("#cl-entry").mousein( function(){
      cl_close = 0;
    }).mouseout( function(){
      cl_close = 1;
    });






  2. function _finish() {
            if(cl_close == 1)$('#cl-entry-layer, #cl-entry-wrap, #cl-entry').remove();
    }


Works fine in FF and IE 8/9, but in IE6 when i open a select-box they close the layer.

How can i realize, when i click out of #cl-entry that close the overlay?

Kind Regards Steffen











    • Topic Participants

    • gloop