- Timestamp:
- 12/12/11 23:09:18 (6 months ago)
- File:
-
- 1 edited
-
trunk/inc/js/jquery.dolPopup.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/js/jquery.dolPopup.js
r15750 r15752 27 27 align: 'right', 28 28 offset: 0, 29 offset_pointer: 129 offset_pointer: 0 30 30 } 31 31 32 32 if (false != o.pointer) { 33 33 o.fog = false; 34 o.pointer = $.extend({}, defaults_pointer, o.pointer);34 o.pointer = $.extend({}, defaults_pointer, $(document).data('bx-popup-options') ? $(document).data('bx-popup-options') : {}, o.pointer); 35 35 } 36 36 37 if (o.fog && !$('# dolPopupFog').length) {38 $('<div id=" dolPopupFog" style="display: none;"> </div>')37 if (o.fog && !$('#bx-popup-fog').length) { 38 $('<div id="bx-popup-fog" style="display: none;"> </div>') 39 39 .prependTo('body') 40 40 .css({ … … 79 79 } 80 80 81 if (!$el.hasClass(' dolPopup')) { // do this only once82 $el.addClass(' dolPopup');81 if (!$el.hasClass('bx-popup-applied')) { // do this only once 82 $el.addClass('bx-popup-applied'); 83 83 84 84 // save options for element 85 $el.data(' dolPopupOptions', o);85 $el.data('bx-popup-options', o); 86 86 87 87 // attach event for outer click checking 88 88 if (o.closeOnOuterClick) { 89 89 $(document).click(function(e) { 90 if ($el.hasClass(' dolPopup') && $el.is(':visible')) {90 if ($el.hasClass('bx-popup-applied') && $el.is(':visible')) { 91 91 if ($(e.target).parents('#' + $el.attr('id')).length == 0) { 92 92 $el.dolPopupHide(); … … 104 104 $el.css({display: 'none', visibility: 'visible'}).fadeIn(o.speed, o.onShow); 105 105 if (o.fog) 106 $('# dolPopupFog').fadeIn(o.speed);106 $('#bx-popup-fog').fadeIn(o.speed); 107 107 } else { 108 108 $el.css({display: 'block', visibility: 'visible'}); 109 109 if (o.fog) 110 $('# dolPopupFog').show(o.onShow);110 $('#bx-popup-fog').show(o.onShow); 111 111 } 112 112 … … 126 126 var $el = $(this); 127 127 128 if (!$el.hasClass(' dolPopup'))129 return false; 130 131 var o = $el.data(' dolPopupOptions');128 if (!$el.hasClass('bx-popup-applied')) 129 return false; 130 131 var o = $el.data('bx-popup-options'); 132 132 133 133 if (!o) … … 139 139 if (o.speed > 0) { 140 140 if (o.fog) 141 $('# dolPopupFog').fadeOut(o.speed);141 $('#bx-popup-fog').fadeOut(o.speed); 142 142 $el.fadeOut(o.speed, oHide.onHide); 143 143 } else { 144 144 if (o.fog) 145 $('# dolPopupFog').hide();145 $('#bx-popup-fog').hide(); 146 146 $el.hide(oHide.onHide); 147 147 }
Note: See TracChangeset
for help on using the changeset viewer.