javascript - Removing a CSS element using JS -
so have function in js file fine...
$('.pets').mouseenter(function() { $('.box2').removeclass('box').addclass('box-hover'); }); $('.pets').mouseleave(function() { $('.box2').removeclass('box-hover').addclass('box'); });
but, have p element display: none before event. there way can remove 'display: none' within mouseenter/mouseleave function?
to remove specific css:
$("div").css({ 'display' : '', 'opacity' : '' });
to remove whole inline style:
$("div").removeattr('style');
Comments
Post a Comment