This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert all element properties to children | |
* | |
* @param array $array An array with one or more keys that begine with '#' . | |
* | |
* @return array Any key that began with '#' will have the # stripped. | |
*/ | |
function element_properties_to_children($array) { | |
$keys = array_map(create_function('$item', 'return substr($item, 1);'), array_keys($array)); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A jQuery Plugin to fade in multiple DOM elements in step-wise succession. | |
* | |
* @param bool|object options | |
* A boolean value will be interpreted as {start: [value]}. | |
* An object with these properties: | |
* - speed int How fast to reveal the step in seconds. Each element may also | |
control it's individual speed with the attribute data-speed. | |
* - delay int Defaults to 0. How many seconds between the end of one step and | |
the start of the next. You may also use data-delay for element specific |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* HTML5 Media Resume Playback (Playhead Position Memory) jQuery Plugin | |
* | |
* Remembers the playback position of media and resumes on page load. The | |
* playhead position is set on the media events: play, pause, and seeked; as | |
* well the position is recorded at an interval defined in the options, anytime | |
* the media is playing. | |
* | |
* Requires the jStorage plugin <http://www.jstorage.info/> | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert iframes to divs via ajax iframe_to_div jQuery Plugin | |
* | |
* Uses javascript to replace iframes with divs containing their source content | |
* by loading via ajax. If you use this to load vanilla html snippets, this has the | |
* effect of applying the page's css to your vanilla html snippet. | |
* | |
* This will not work if the iframe src is not a relative link due to ajax restrictions across domains. | |
* | |
* As an example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Swiper jQuery Plugin | |
* | |
* You need to also include: | |
http://www.netcu.de/jquery-touchwipe-iphone-ipad-library | |
* | |
* @code | |
* <script> | |
* $('.track').swiper({ | |
* 'trainClass': 'train', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create a searchable list by textfield jQuery Plugin | |
* | |
* @param object $input | |
* A jQuery object of a textfield to use as the search box | |
* @param options | |
* code: the ascii code of the key to use for lookup; when this is pressed | |
the list will be searched, defaults to 13 for the Return key. | |
* auto: min length needed before it will autosearch, for large lists | |
setting this too low results in poor performance. Set this to 0 to turn off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds a Check All Option to a group of Checkboxes in Drupal jQuery Plugin | |
* | |
* To make this work you need pass to this function, a div that is a decendent | |
of a form and an ancestor of multiple checkboxes. It is specifically tuned to | |
drupal, but can be used for any html by setting the options. Here's and | |
example, where .form-item-list is fapi element of type checkboxes. | |
* | |
* @code | |
* $('#my-form .form-item-list').drupalCheckAll(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This has been moved to http://www.intheloftstudios.com/packages/jquery/jquery.running_clock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Form Element Width Equalizer Plugin (Optimized for Drupal FAPI) | |
* | |
* Adjusts the widths of child elements to a set pixel dimension. | |
* | |
* Makes all text fields and text areas (or other as specified in | |
* options.elements) equal widths by subracting the css properties of: margin, | |
* border and padding from each element. | |
* | |
* If width is omitted then all elements will have their width matched to $(this) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This has moved to http://www.intheloftstudios.com/packages/jquery/jquery.loft_labels |