1
By clicking a button one div
appears with the effect going up to the top, with Jquery. I need that when clicking again it goes away with the opposite animation - going down. As I know little about JS, I could only do it with two different buttons.
There’s a way to do it, in the style of a toggle
with only one button?
My code so far:
$(".lyricshow").click(function () {
$(".lyricscreen").show()
.animate({top:0}, function() {});
});
$(".lyricsclose").click(function () {
$(".lyricscreen").hide()
.animate({bottom:0}, function() {});
});
Thiago da para fazer com apenas 1 botão e CSS, esse mesmo efeito! Sem jQuery nem JS, se quer eu posto um exemplo na resposta.
– hugocsl