jQuery clickoutside event v1.0

|

With jQuery clickoutside event you can bind an event that will be triggered only when the user clicks outside the element in question. And because a reference to the clicked element is available as event.target you can change behavior based on what element is clicked.

This a fairly simple example of a jQuery “special event” plugin, so if you want to write one of your own, feel free to take a look at the fully commented source code. If you just want to, like, actually use the plugin, check out the project page!

Post A Comment

  • Any of these HTML tags may be used for style: a, b, i, br, p, strong, em, pre, code.
  • Multi-line JavaScript code should be wrapped in <pre class="brush:js"></pre>
    (supported syntax highlighting brushes: js, css, php, plain, bash, ruby, html, xml)
  • Use &lt; instead of < and &gt; instead of > in the examples themselves.