jquery .hide code example
Example 1: hidden jquery
$('#yourid').attr('hidden', false);
$('#yourid').attr('hidden', true);
Example 2: jquery show hide
$("#hide").click(function(){
$("p").hide();
});
$("#show").click(function(){
$("p").show();
});
Example 3: jquery to hide a div
<div id="main">
<p> Hide/show this div </p>
</div>
('#main').hide();
$("#main").css("display", "none");
Example 4: save action hide element in jquery
<html>
<head>
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="../js.cookie.js"></script>
</head>
<body>
<button id='clckced'> removeCount</button>
<div id="RemoveCount">
This should be removed.
</div>
<script>
$(function(){
if (Cookies.get('RemoveCount') == 'true' && Cookies.get('RemoveCount') != 'undefined' ){
$("#RemoveCount").hide();
} else {
$("#RemoveCount").show();
}
$('#clckced').click(function(){
Cookies.set('RemoveCount', 'true');
$("#RemoveCount").hide();
})
});
</script>
</body>
</html>