.toggle()
With no parameters, the .toggle() method simply toggles the visibility of elements
Ostatnią metodę toggle zostaw "pustą"
$(function() {
$('.show-consent').click(function() {
$(this).parents('div').closest('.consent-box').find('.agree_text_full').toggle();
});
});
możesz skrócić zapis
$(function() {
$('.show-consent').click(function() {
$('.consent-box').find('.agree_text_full').toggle();
});
});
lub
$(function() {
$('.show-consent').click(function() {
$('.agree_text_full').toggle();
});
});
@overcq
oraz była literówka w “show”
nie ma żadnej literówki .toggle() m. in. "posiada" parametr "slow"
[ on-line ]
$(function() {
$('.show-consent').click(function() {
$('.agree_text_full').toggle('slow');
});
});