<p>This method is a shortcut for <code>.bind('mouseup', handler)</code> in the first variation, and <code>.trigger('mouseup')</code> in the second.</p>
<p>The <code>mouseup</code> event is sent to an element when the mouse pointer is over the element, and the mouse button is released. Any HTML element can receive this event.</p>
<p>The event handler can be bound to any <code><div></code>:</p>
<pre>$('#target').mouseup(function() {
alert('Handler for .mouseup() called.');
});
</pre>
<p>Now if we click on this element, the alert is displayed:</p>
<p><spanclass="output">Handler for .mouseup() called.</span></p>
<p>We can also trigger the event when a different element is clicked:</p>
<pre>$('#other').click(function() {
$('#target').mouseup();
});</pre>
<p>After this code executes, clicks on <spanclass="output">Trigger the handler</span> will also alert the message.</p>
<p>If the user clicks outside an element, drags onto it, and releases the button, this is still counted as a <code>mouseup</code> event. This sequence of actions is not treated as a button press in most user interfaces, so it is usually better to use the <code>click</code> event unless we know that the <code>mouseup</code> event is preferable for a particular situation.</p>