This file contains 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
/** | |
* Set a multidimensional array element based on an array of nested keys. | |
* | |
* @code | |
* $vars = array(); | |
* $string = 'some.string.of.keys'; | |
* $keys = explode('.', $string); | |
* $value = 'final value'; | |
* array_set_nested_element($vars, $keys, $value); | |
* @endcode |
This file contains 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
/** | |
* Output font-size (and line-height) in rem with px fallback | |
* | |
* After declaring a font-size of 100% on the html tag, you should use the | |
@font_size for all other font-size declarations. | |
* | |
* @code | |
* html { | |
* font: 100%/1.4 "Times New Roman", Times, Serif normal; | |
* } |
This file contains 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 gist has moved: http://www.intheloftstudios.com/packages/jquery/jquery.viewport_class |
This file contains 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 |
This file contains 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 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 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 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
/** | |
* Checks one or more render arrays for any visible content. | |
* | |
* @param ... array One or more renderable arrays. | |
* | |
* @return bool | |
*/ | |
function my_theme_has_content() { | |
$build = func_get_args(); |
This file contains 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
/** | |
* Smooth scroll to anchors | |
* | |
* Looks first for a dom with id of the href fragment of the link; then it looks | |
for an dom element by name=fragment | |
* | |
* @param function callback | |
* onClick callback function receives two params jQuery objects: link, target | |
* @param object options | |
* - distance: int |
This file contains 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
/** | |
* Implements hook_js_alter(). | |
* | |
* Replace the system-provided jquery with our own higher version for the theme. | |
*/ | |
function my_theme_js_alter(&$javascript) { | |
// Go through and replace the jquery that is being provided by the system | |
// with out own higher version for the theme. We use an array | |
// here in case the jquery update module is/is not being used. |
OlderNewer