jquery display none
The correct way to do this is to use show and hide:
$('#id').hide();
$('#id').show();
An alternate way is to use the jQuery css method:
$("#id").css("display", "none");
$("#id").css("display", "block");
jquery display none
The correct way to do this is to use show and hide:
$('#id').hide();
$('#id').show();
An alternate way is to use the jQuery css method:
$("#id").css("display", "none");
$("#id").css("display", "block");
show more implementation jquery
var $li = $('ul li');
var $shPets = $('.shPets');
$shPets.each(function() {
var petType = $(this).data('pet');
$('ul li[data-pet=' + petType + ']')
.not('.shPets') //not shPets
.not(':first') //everything except first
.hide();
});
$('.shPets').click(function() {
var petType = $(this).data('pet');
if ($(this).text() == 'Show More..') {
$(this).text('Hide');
$('ul li[data-pet=' + petType + ']').show();
} else {
$(this).text('Show More..');
$('ul li[data-pet=' + petType + ']')
.not('.shPets') //not shPets
.not(':first') //everything except first
.hide();
}
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us