Show product popup (facebox.js) in the middle

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

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

to:

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

Please Log in to join the conversation.

Time to create page: 0.196 seconds
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