Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- a/docs/js/jqmodal/jqmodalwin.js
- +++ b/docs/js/jqmodal/jqmodalwin.js
- @@ -1,5 +1,6 @@
- var jqmwin_focus = false;
- var jqmwin_count = 0;
- +var close_event = false;
- function jqmwin(win)
- {
- jqmwin_count++;
- @@ -133,7 +134,13 @@ function jqmwin_attach_close(func, winid) {
- // sometiems IE6 likes to destroy the reference to the event before it can be bound.
- try {
- - $("#close_"+winid).click( function() { func() } );
- + close_event = true;
- + $("#close_"+winid).live( 'click', function() {
- + func();
- + if(close_event) close_event.cleartimeout();
- + }
- + );
- + //$("#close_"+winid).click( function() { func() } );
- }
- catch(e) {}
- }
- @@ -143,6 +150,14 @@ function jqmwin_refresh(winid) {
- }
- var jqmwin_close_process=function(hash) {
- + if(close_event)
- + close_event = settimeout(do_close(), 3000);
- + else
- + do_close();
- +
- +};
- +
- +function do_close(hash) {
- jqmwin_count--;
- $('#overlay'+hash.w.attr('id')).remove();
- $('#hideselect'+hash.w.attr('id')).remove();
- @@ -170,9 +185,6 @@ var jqmwin_close_process=function(hash) {
- $('#centercontent').show(1);
- }
- - });
- -
- -
- -
- -};
- + });
- +}
Add Comment
Please, Sign In to add comment