Created
March 11, 2015 10:47
-
-
Save jamiemagique/56963b2b71d68b728bb1 to your computer and use it in GitHub Desktop.
yepnope() test example
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
yepnope([{ | |
test: $('.CLASSNAME').length !== 0, | |
yep: Drupal.settings.basePath + Drupal.settings.pintSettings.pathToTheme + '/js/vendor/YES-FILENAME.js', | |
nope: Drupal.settings.basePath + Drupal.settings.pintSettings.pathToTheme + '/js/vendor/NOPE-FILENAME.js', | |
}]); |
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
function THEMENAME_preprocess_page(&$variables) { | |
// Add custom settings | |
drupal_add_js(array( | |
'customThemeSettings' => array( | |
'pathToTheme' => path_to_theme() | |
) | |
), 'setting'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment