V
V
VladislavGH2011-06-02 10:33:43
JavaScript
VladislavGH, 2011-06-02 10:33:43

Gallery not working, where is the error?

Hello!

I am currently learning Jquery. I decided to make my first gallery which is not working now, but I can't find the error. Habrazhiteli, please tell me where the error is.



HTML code (clipping): Sorry for the picture. It just didn't display the html code tag. Javascript and jQuery code:

8e84a530515408e5b4a633be910ae219.JPG



$(document).ready(function(){<br/>
$('#small a').click(function(eventObject){<br/>
 $('#big img').hide().attr('scr',$(this).attr('href'));<br/>
 $('#big img').load(function() {<br/>
 $(this).fadeIn(2000);<br/>
 });<br/>
 <br/>
 eventObject.preventDefault();<br/>
});<br/>
<br/>
})


CSS code:

#gallery {<br/>
 padding: 20px;<br/>
 border:1px solid #cccccc;<br/>
 width: 483px;<br/>
 margin: 10px auto;<br/>
 height: 380px;<br/>
}<br/>
<br/>
#big {<br/>
 background-image: url(&quot;../images/gal/loader.gif&quot;);<br/>
 background-repeat: no-repeat;<br/>
 background-position: 50% 50%;<br/>
 width: 483px;<br/>
 height: 302px;<br/>
 border:1px dotted #cccccc;<br/>
 }<br/>
<br/>
#small {<br/>
 margin-top: 10px;<br/>
 margin-left: 33px;<br/>
 <br/>
}<br/>
<br/>
#small a img{<br/>
 border:none;<br/>
 <br/>
}<br/>

The error is the following:


When you click on the thumbnail, the loading image is shown, but there is no big image that should go into the DIV block.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question