Show product popup (facebox.js) in the middle

Mehr
13 Jahre 1 Monat her #364 von Simpel
Some tip:

Change in facebox.js (/components/com_oscommerce/includes/javascript/facebox.js)
Code:
$('#facebox').css({ top: getPageScroll()[1] + (getPageHeight() / 6), left: 485.5 }).show()

to:

Code:
$('#facebox').css({ top: getPageScroll()[1] + (getPageHeight() / 10), left: ($(window).width() / 2) - ($('#facebox').outerWidth() / 2) }).show() $(document).bind('afterReveal.facebox', function() { var windowHeight = $(window).height(); var faceboxHeight = $('#facebox').height(); if(faceboxHeight < windowHeight) { $('#facebox').css('top', (Math.floor((windowHeight - faceboxHeight) / 2) + $(window).scrollTop()) ); } });

Now the product popup shows up in the middle of you internetbrower.
If somebody know how to stay there when scrolling your browser let me know! :woohoo:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Events Joomla
MarvikShop
Finnaly it's here:
 
No bridges, no look a likes!
This is the ultimate integration
between Oscommerce and Joomla!
Documentation
Site Showcase
Follow us