Остается overlay после закрытия модального окна
Здравствуйте!
Есть скрипт, который вызывает появление всплывающего окна при перемещении курсора в верхнюю часть экрана: $(document).ready(function() { $(document).mousemove(function(e) { if (e.pageY - $(document).scrollTop() <= 5) { // Launch MODAL BOX $('#exit_content').modal({onOpen: modalOpen, onClose: simplemodal_close}); } }); }); /** * When the open event is called, this function will be used to 'open' * the overlay, container and data portions of the modal dialog. * * onOpen callbacks need to handle 'opening' the overlay, container * and data. */ function modalOpen (dialog) { dialog.overlay.fadeIn('fast', function () { dialog.container.fadeIn('fast', function () { dialog.data.hide().slideDown('fast'); }); }); } /** * When the close event is called, this function will be used to 'close' * the overlay, container and data portions of the modal dialog. * * The SimpleModal close function will still perform some actions that * don't need to be handled here. * * onClose callbacks need to handle 'closing' the overlay, container * and data. */ function simplemodal_close (dialog) { dialog.data.fadeOut('fast', function () { dialog.container.hide('fast', function () { dialog.overlay.slideUp('fast', function () { $.modal.close(); }); }); }); } Проблема в том, что после закрытия этого модального окна, остаются "следы", которые не дают нормально работать дальше: simplemodal-overlay и simplemodal-container... я не особо разбираюсь в js, но видимо их надо как-то "дополнительно отключить" в этом скрипте... Помогите пожалуйста. |
Если смотреть по представленному вами коду, то overlay должен сворачиваться.
Сделайте макет, который будет отражать вашу проблему, либо дайте ссылку на сайт, где эта проблема наблюдается и напишите как её воспроизвести. |
вроде бы разобрался немного, когда нашел оригинал данного примера http://ruseller.com/lessons.php?id=195 - сама кнопка "Закрыть" какая-то не такая... у меня в коде она прописана
<img src="example/x.png" id="close" />.. а в примере вставляется непосредственно в js... смысла не понял, но родная кнопка работает как надо ) |
Часовой пояс GMT +3, время: 08:35. |