I\'m using this jQuery to hide a DIV:
$(\"#slider\").click(function() {
$(\".help\").slideToggle();
$(\"#wrapper\").animate({ opacity: 1.0 },200).sli
You can hide one initially via CSS, then just toggle the two in your function, use this for CSS:
.hide { dislay: none; } //Reverse if "Hide" should be the default button
And this jQuery, using .toggle() (without arguments, it toggles visibility):
$("#slider").click(function() {
$(".help").slideToggle();
$("#wrapper").animate({ opacity: 1.0 },200).slideToggle(200, function() {
$("#slider img").toggle();
});
});
This would toggle the visibility of both images...since one's hidden and you only have 2, it effectively swaps them. Also make sure to fix your alt
/title
attributes on the .show
one for the screen reader folks :)