I am trying to add an animation effect to the jQuery code below when the class home-search-fixed is either added or removed to so that div home-search-box animates in or out
$(document).scroll(function() {
var y = $(this).scrollTop();
if (y > 180) {
$("#menu-item-504").click(function (evt) {
$(".home-search-box")
.addClass("home-search-fixed");
evt.preventDefault();
});
} else {
$(".home-search-box")
$(".home-search-box")
.removeClass("home-search-fixed");
}
#menu-item-504is cliked.home-search-box appearswith an animated effected rather than just showing.