I just upgraded a site to 1.9.1 and the scipt below dont work anymore:
Script
$(document).ready(function(){
$("#button").toggle(function() {
$(this).text('Hide content');
}, function() {
$(this).text('Show content');
});
$('#button').click(function(){
$("#content_div").slideToggle("medium");
});
});
HTML
<a href="#" id="button">Show content</a>
I am not so good at jQuery so I hope somebody can help me with this script, I´ll appreciate if a answer contains a explanation of the solution (trying to learn jQuery).
Thanks!
I think the following gives you the full functionality that you’re looking for. It feels self-explanatory to me, but then again, I wrote it haha. So let me know if it makes sense and does what you need it to do 🙂