Answer the question
In order to leave comments, you need to log in
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:
$(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/>
})
#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("../images/gal/loader.gif");<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/>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question