Friday, January 23, 2009

Litebox and google checkout

Just putting some finishing touches on my webshop for its opening in Februrary 2009. While doing this I noticed that the Google checkout shopping cart broke the Litebox scripts I had for viewing photo closeups.
Did some snooping about the net and looked at other sites that used lightbox and google checkout and found the following snippet that seems to fix things.

just add this to the end of your shop page to fix or alternatively fix the litebox/lightbox engine ( i'm too lazy so I thought I'd post this so someone else might do it ;)


<!-- GOOGLE CHECKOUT/LIGHTBOX FIX -->
<script type="text/javascript">
if(window.attachEvent && !window.addEventListener)
document.attachEvent('onclick', function(){
var s = window.event.srcElement;
if((s.rel && /^lightbox/.test(s.rel)) || (s.parentNode &&
s.parentNode.rel && /^lightbox/.test(s.parentNode.rel)))
return false;
});
</script>
<!-- GOOGLE CHECKOUT/LIGHTBOX FIX -->

0 Comments:

Post a Comment

<< Home