Here is a code snippet I'm using to toggle the visibility of content:
$(function(){
$('#slider').css('display','');
$('#hideslider').click(function(){
$('#slider').slideToggle('slow');
$(this).toggleClass('slideSign');
return false;
});
});
Whenever #hideslider
is clicked, it toggles the visibility of the content in #slider
. The background image for #hideslider
is set as an upward arrow in the CSS. Is there a way to change this background image to a downward arrow when the content in #slider
is hidden (i.e., display property set to 'none'
)? In other words, if #slider
is not displayed, can we change the background image of #hideslider
? Any assistance on this matter would be greatly appreciated. Thank you.