jQuery > Events

Mouse up event in jQuery

How to attach mouse up event to a html element in jQuery?


To attach mouse up event to a html element, mouseup() method can be used.

<script>
        $("#spanMouseDownUp").mouseup(function () {
            $(this).html("Mouse released");
        });
    </script>

In the above code when user releases the mouse button from “spanMouseDownUp” element then “Mouse released” text will be written inside it.

 Views: 4598 | Post Order: 81



Write for us






Hosting Recommendations