a handful of little unrelated niceties that are too small to justify their own plugins
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.textile
jquery.odds_and_ends.js

README.textile

jquery-odds_and_ends

What is it?

A handful of little unrelated niceties that are too small to justify their own plugins.

Methods

confirmation()

Intercepts the click event with a generic (and annoying) confirmation box. Cancels the action per the user’s response.

printOnClick()

Intercepts the click event, calls window.print(), and stops the event.

toggleTarget()

Intercepts the click event, uses the elements target attribute as a selector to find an element to toggle, then stops the event.

$.number()

Extracts the number out of a string.
$.number('alsiejflij3.14alsiejf') // 3.14