YUKI
0
Q:

save action hide element in jquery

//$(selector).hide(speed,easing,callback)

$('#yourElement').hide(); //this works just fine
$('#yourElement').hide(1000); //hides in 1 second
$('#yourElement').hide(1000, 'swing'); //valid values are swing or linear
$('#yourElement').hide(1000, 'linear', yourFunctionHere()); //same as above but with a callback to a custom function
$('#yourElement').hide(1000, 'linear', function() {
	//you can even do this to just write a one-time function inline if necessary
});
11
$('#yourid').attr('hidden', false);
$('#yourid').attr('hidden', true);
1
$(function() {
    if (Cookies.get('RemoveCount') == 'true' && Cookies.get('RemoveCount') != 'undefined') {
        $("#count").hide();
    } else {
        $("#count").show();
    }
}
0
<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>
0

New to Communities?

Join the community