views:

51

answers:

2

I have a problem in lightbox. This is the link when i clicked login form appears.

<a href="index.php?g=login.html" title="Login Form"
 rel="gb_page_center[425, 220,login.html]">Login</a>

When I click the link before page loads, page opens in new window. light box isn't working correctly. I need to block this link utill lightbox loads.

How can I do this in javascript?

click the top corner link login

Link: http://www.clubforeducation.com/

+1  A: 

You might want to include your lightbox javascript code at the bottom of the page. Or hide all your images initially while page is loading; once page is loaded, you can show all links again with something like below:

window.onload = function()
{
  // note: using jquery here
  $("a.lightboxlinks").css('display':'inline');
};
Sarfraz
+2  A: 

Did you try adding some attribute like onclick='return false;' ?

Mohamed Meligy
thank you it works.
boss