Search code examples
javascriptjqueryslidedown

jQuery slide down div - disappears when click on callback


I have a bit of a problem. Have done some slide down in to div of a calendar, work nice, but after I click on the arrow to change the month, whole calendar disappears. And I can't open the calendar again.

Here is the working version: http://apartamentychlebiwino.eu/rezerwacja/booking-search.php?check_in=14/05/2018&check_out=15/05/2018&capacity=1&currency=PLN

This is my code:

 $('.caleran-header').click(function(){
     $('.caleran-calendars').slideDown(1000);
     $('.caleran-header-start').addClass('kalendarz-start');
 });

Solution

  • The calendar dissapears for this:

    .caleran-calendars{
        display:none;
    }
    

    Maybe you have to show the calendar container, maybe you can try

    $('.caleran-header').click(function(){
    $('.caleran-calendars').slideDown(1000, function(){$(this).show()});
    $('.caleran-header-start').addClass('kalendarz-start');
    });