Show product popup (facebox.js) in the middle

12 years 1 month ago #364 by Simpel
Some tip:

Change in facebox.js (/components/com_oscommerce/includes/javascript/facebox.js)
        top:	getPageScroll()[1] + (getPageHeight() / 6),
        left:	485.5


   top: getPageScroll()[1] + (getPageHeight() / 10),
   left: ($(window).width() / 2) - ($('#facebox').outerWidth() / 2)

 $(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:

Please Log in to join the conversation.

Time to create page: 0.196 seconds
Events Joomla
Finnaly it's here:
No bridges, no look a likes!
This is the ultimate integration
between Oscommerce and Joomla!
Site Showcase
Follow us