| 
		
			| sentance | 11.07.2016 11:59 |  
 Проблема с работой mousemove
 Задача стоит в следующем. Необходимо при выходе с рабочей зоны окна страницы выводить окно с формой обратной связи. Для этого я использовал следующий вариант 
$(document).ready(function() {
$(document).mousemove(function(e) {
if(e.pageY <= 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();
			});
		});
	});
}
Проблема в следующем... Окно появляется постоянно после выхода курсора с рабочей зоны. Необходимо что бы окно не появлялось после закрытия в течении дня, к примеру. Я понимаю что это делается с помощью куков но понять как это сделать здесь затрудняюсь. Так же, тут используется jquery-1.3.2, необходимо изменить на 1.9+ 
Есть у кого варианты? |