I am using fancybox to show a small QR code, then you can click on the code and it is shown in a lightbox. The problem is, when you click on the thumbnail, you are taken directly to the image instead of it being displayed in the lightbox.
Here is my code:
<a href="http://chart.apis.google.com/chart?chs=500x500&cht=qr&chld=|1&chl=sample_text" rel="fancybox" class="fancybox">
<img src="http://chart.apis.google.com/chart?chs=50x50&cht=qr&chld=|1&chl=sample_text" alt=""/>
</a>
<script>
$(".fancybox").fancybox( {
openEffect: 'elastic',
closeEffect : 'elastic',
});
</script>
Here is my code in jsfiddle: