<script type="text/javascript">
$(document).ready(function () {
alert("ready");
$("#comentario").fadeIn(1000);
$("#nome").fadeIn(2000);
$("#foto").fadeIn(4000);
$(".back").click(function () {
$("#comentario").fadeout(1000);
$("#nome").fadeout(2000);
$("#foto").fadeout(4000);
})
$(".next").click(function () {
$("#comentario").fadein(1000);
$("#nome").fadein(2000);
$("#foto").fadein(4000);
})
})
</script>
Well, seeing the code above, I need to know what is wrong, when my document starts, it gives the fadein in the 3 ids pointed there (comment, name, photo). However, when the button is pressed from the classes (.next, .back) it does not make the promised ...
curiosity: alert () runs only at the beginning of each function, not in the middle, or at the end, example:
$(".next").click(function(){
alert("vai emitir a mensagem");
$("#comentario").fadein(1000);
$("#nome").fadein(2000);
$("#foto").fadein(4000);
})
})
but if it is not in the first line of the function, it does nothing ..
$(".next").click(function(){
$("#comentario").fadein(1000);
alert("não vai emitir a mensagem");
$("#nome").fadein(2000);
$("#foto").fadein(4000);
})
})
I'm using the Jquery library, .. Thanks!