Show product popup (facebox.js) in the middle

Meer
13 jaren 1 maand geleden #364 door 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:

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

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