Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

parse


Any+Time™ Datepicker/Timepicker AJAX Calendar Widget with Optional TimeZone Support

The Any+Time™ JavaScript Library includes a highly-customizable, jQuery-compatible datepicker/ timepicker (calendar/ clock widget) and a powerful Date/String parse/format utility. Use it to create a date/time picker with advanced features and options not found in other calendar/clock widgets:

DATE/TIME OPTIONS:

* 12-hour or 24-hour clock
* custom date/time format (countless possibilities, including JSON and XML)
* date-only, time-only, or specific fields!
* date/time range limits
* era-selection (BCE/CE, BC/AD, etc.)
* start week on any day (Sunday, Monday, etc.)
* custom base for 2-digit years (1900, 2000, etc.)
* UTC offsets/time zones

STYLING OPTIONS:

* custom labels/languages
* custom CSS styles
* jQuery UI Theming
* jQuery UI Theme Switcher
* jQuery ThemeRoller
* pop-up or always-present picker
* visible or hidden field

PROGRAMMER-FRIENDLY:

* easy to implement with only one statement
* easy AJAX validation
* easy Date/String conversion, including JSON and XML
* create multiple pickers at once
* easy removal
* easy to extend

USABILITY FEATURES:

* em-based relative-size
* single-click value selection
* WAI-ARIA 1.0 keyboard accessibility
* double-click select-and-dismiss

Use AnyTime.Converter to parse a String into a Date, or convert a Date to a String. Many format options are supported—in fact, most of the fields specified by the MySQL DATE_FORMAT() function!

Parse

This small plugins provides a simple function that evaluates a string to a primitive value (if possible).

Supported primitives:

  • Numbers: Supported formats
    • Integers f.e: 1
    • Floats f.e: 1.5
    • Hexadecimal f.e: 0xFF
    • Exponential notation f.e: 1e5

    All these formats support negative values as well.

  • Booleans: Supports "true" and "false"
  • Strings: Unrecognized strings are returned without any modification.

jParse

This plugin allows you to quickly and easily parse XML that has been fetched with the jQuery .ajax method. The plugin gives you custom output options, ability to limit the number of parsed, output a count of the number of in the XML and run a functions before and after parsing.

urlParser

This plugin contains urlParser class and $.urlParser object of this class suitable for parsing URLs.

Properties
* $.urlParser.protocol. Protocol part (i.e. "html:", "file:", "ftp:")
* $.urlParser.host. Host part (i.e. "jquery.com")
* $.urlParser.path. Path (i.e. "/mysection/mypage.html")
* $.urlParser.parameters. Parameters list of type Object
* $.urlParser.anchor. Anchor part (i.e. "#start")

Methods

* $.urlParser.parse(string url). Parses passed URL, changing protocol, host, path, parameters, anchor accordingly. Returns object of urlParser class.
* $.urlParser.assemble(). Assembles URL string from parts and returns it.
* $.urlParser.setBaseUrl(string url). Changes URL base.
* $.urlParser.resetBaseUrl. Reset url base to current document URL.

Examples
* $.urlParser.parse('http://jquery.com/docs/').host will return "jquery.com"
* $.urlParser.parse('/docs/').host will return current host

parseQuery

jQuery.parsequery.js is a simple querystring parser. By default it parses the querystring of the window location object, however you can also pass a querystring to it. It returns an object whose key/value pairs correspond to the name/value pairs of the querystring.

For multiple values with the same name, like those from a multi-select menu for example, the value in the returned object is an array.

By default the values are passed to a function that unescapes them and replaces plus (+) symbols with spaces. You can override this function with your own in an options object passed to the plugin.

You can pass in either a querystring or an options object, or both (if both are used, the querystring should come first).

Usage (assuming the querystring is ?foo=bar&count=aon&count=do&count=tri&test=true):

var q = $.parseQuery(); //parses the window location querystring by default
console.log(q.foo); //returns string 'bar'