1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
| function showBlackout(smartScreenOn) {
$('#blackout').show();
$('#blackout').animate({
opacity: '0.8'
}, { duration: 500, queue: false });
smartScreenOn=1;
};
function hideBlackout(smartScreenOn) {
if ($('#lightboxContent').is(":visible") || $('#smartArea').height() !== 0)
return;
$('#blackout').animate({
opacity: '0'
}, { duration: 500, queue: false, complete: function() {
$('#blackout').hide();
}});
};
function showSmartScreen(screenName,userId) {
if ($('#smartArea').height() === 0) {
$(function() {
showBlackout();
$('#smartArea').animate({
height: '500px'
}, { duration: 350, queue: false, complete: function() {
//alert(screenName+'.php');
$.get('html/'+screenName+'.php?user='+userId, function(data) {
$("#smartAreaContent").html(data);
});
$('#'+screenName).show();
$("#smartArea").click(function(event) {
if ($(event.target).hasClass('loginButton')) {
dismissSmartScreen();
$(document).off("click");
}
return false;
});
testFunction();
$(document).one("click", function() {
dismissSmartScreen();
});
}});
});
}else{
}
};
function dismissSmartScreen() {
$('#smartArea').animate({
height: '0'
}, { duration: 350, queue: false, complete: function() {
/* to avoid seeing the old content for a second when switching content */
$('.smartContainer').hide();
hideBlackout();
}});
}; |
Partager