jQuery: Hide effect

The jQuery hide effect will hide the matched elements.

Its code is .hide(duration), where duration is in ms.

The default for duration is 400ms.

<!doctype html>
<html>
<head>
    <title>hide demo</title>
    <script src='//code.jquery.com/jquery-1.10.2.js'></script>
    <style>
        p {
            background: #dad;
            font-weight: bold;
        }
    </style>
</head>
<body>

<button>Click Me</button>
<p>Hiya</p>

<p>Such interesting text, eh?</p>

<script>
    $('button').click(function () {
        $('p').hide('slow');
    });
</script>

</body>
</html>

Try The Code

Series Navigation<< jQuery: .toggleClass
jQuery: Toggle effect >>