Knowledge Walls
Gopal Rao
Mumbai, Maharashtra, India
Jquery mousedown example in Jquery functions of JQuery Examples
When you press the mouse button(i.e the button moving down) the mousedown() called.And when you release the mouse button(i.e the button moving up) the mouseup() function called.

In the following example When you press the element one div will appear, when you release the button the div will hide.
Example code

    <script type="text/javascript" src=""></script>

    <script type="text/javascript">
        $(function () {
            $(".one").mousedown(function () {
            $(".one").mouseup(function () {
    <style type="text/css">
        .two {
            display: none;

    <div class="one">click this element</div>
    <div class="two">you pressing the element</div>

Example demo 
Previous Topics
Previous lessons of current book.
Best Lessons of "JQuery Examples"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details