- Berichten: 59
- Ontvangen bedankjes 3
Show product popup (facebox.js) in the middle
13 jaren 1 maand geleden #364
door Simpel
Show product popup (facebox.js) in the middle werd gestart door Simpel
Some tip:
Change in facebox.js (/components/com_oscommerce/includes/javascript/facebox.js)
to:
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:
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.