I have this code.
CSS
body {
font-family:Verdana, Geneva, sans-serif;
font-size:14px;
}
.slidingDiv {
height:300px;
background-color: #99CCFF;
padding:20px;
margin-top:10px;
border-bottom:5px solid #3399FF;
}
.show_hide {
display:none;
}
HTML
<a href="#" class="show_hide">Show/hide</a>
<br />
<div class="slidingDiv">
Fill this space with really interesting content.
<a href="#" class="show_hide">hide</a>
</div>
JS
$(document).ready(function(){
$(".slidingDiv").hide();
$(".show_hide").show();
$('.show_hide').click(function(){
$(".slidingDiv").slideToggle();
});
});
Someone tell me if its possible to add in this jquery function that if i click on it, at the same time to show/hide a new div, change a class to an tag and remove another class from another tag? How can i do it?
Thanks.