Answers for "jquery set visible"

2

jquery visible

$(":visible");
//or
$().is(":visible");
Posted by: Guest on March-24-2020
0

jquery visible

$(element).is(":visible");
$(element).is(":hidden");
Posted by: Guest on April-19-2021
1

jquery set visibility

An even simpler way to do this is to use jQuery's toggleClass() method

CSS
.newClass{visibility: hidden}

HTML
<a href="#" class=trigger>Trigger Element </a>
<div class="hidden_element">Some Content</div>

JS
$(document).ready(function(){
    $(".trigger").click(function(){
        $(".hidden_element").toggleClass("newClass");
    });
});
Posted by: Guest on April-26-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language