Created
October 16, 2020 12:05
-
-
Save ramzs/77a2b3c210547172f0beacf519f5119e to your computer and use it in GitHub Desktop.
Изменить класс display: block на другой для fadeToggle или slideToggle. Замена текста туда сюда
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.product-shops__linkall').bind('click', function () { | |
var th = $(this); | |
var item = th.closest('.product-shops').find('.product-shops__item:nth-child(n+3)'); | |
th.toggleClass('active').text(th.is('.active') ? 'Свернуть' : 'Еще магазины'); | |
item.stop().fadeToggle({ | |
start: function () { | |
$(this).css('display', 'flex'); | |
} | |
}); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment