Problem with jQuery array
Posted
by user236106
on Stack Overflow
See other posts from Stack Overflow
or by user236106
Published on 2010-03-21T15:56:35Z
Indexed on
2010/03/21
16:11 UTC
Read the original article
Hit count: 119
jQuery
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
<script type="text/jscript">
$('document').ready(function (){
var clickNo=0;
$('div#pics>img').hide()
$('div#pics>input').click(function(event){
$('div#pics>img')[0].show('slow');
})
});
</script>
</head>
<body>
<div id="pics">
<input type="button" value="next" />
<--a bunch of img tags .I had to resort to this comment because the system won't
let me include the img tag in the code-->
</div>
</body>
</html>
I can't understand why the line $('div#pics>img')[0].show('slow');
is not working.
© Stack Overflow or respective owner