Code:
$( ".btn-slide" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
// Toggle the slide based on its current
// visibility.
if (container.is( ":visible" )){
// Hide - slide up.
container.slideUp( 500 );
$(this).removeClass("active");
Within this click event $(
this) refers to the element(s) $(".btn-slide"). Is this what you intend? If you want to change the class of the container element then use:
Code:
container.removeClass("active");
Hint: If you what to switch a class-name then you would use
Code:
element.removeClass("something").addClass("something-else");
Please wrap your code in [CODE] [/ CODE] tags (without the spaces) and use proper indenting, as it is very difficult to read the code otherwise.