<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>
Je ne comprends pas pourquoi la ligne $('div#pics>img')[0].show('slow');
ne fonctionne pas.Problème avec le tableau jQuery
Astuce:. Au lieu de '$ ('document') prêt (function() {...})' vous pouvez écrire simplement '$ (function () {...}) '. –