0
          if(itemCode == currentHotelCode) {
            $('.search-map__item > div').html($(this).clone());
            $('.search-map__item .search-item-slider').slick('reinit');
          }

i want to reinit slick slider because position changed but that returns error undefined.

Uncaught TypeError: Cannot read property 'reinit' of undefined something like that.

Richard Dallaway
  • 4,250
  • 1
  • 28
  • 39
Ugurcan Omur
  • 73
  • 2
  • 7

1 Answers1

1

Use append to add a dom element to another one, html takes actual html string.

$('.search-map__item > div').empty().append($(this).clone(true, true));
Musa
  • 96,336
  • 17
  • 118
  • 137