jQuery: Hide effect

This entry is part 19 of 33 in the series jQuery Tutorial

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>
    <title>hide demo</title>
    <script src='//code.jquery.com/jquery-1.10.2.js'></script>
        p {
            background: #dad;
            font-weight: bold;

<button>Click Me</button>

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

    $('button').click(function () {


Try The Code

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