I'm trying to get a jQuery lightbox to load up when a page loads. I got half way there. The lightbox opens when the page loads but then proceeds to open the link in the same window as a full page. How do I get it to stop at this point before loading the link in a separate window.
jQuery:
$(document).ready(function(){
$("a.greybox").bind("click", openbox);
$("a.greybox").trigger('click', openbox);
function openbox(){
var t = this.title || $(this).text() || this.href;
GB_show(t,this.href,340,220);
}
})
HTML:
<a href="http://google.com/" title="Google" class="greybox">Launch Google</a>