Last active
December 12, 2015 04:08
-
-
Save jlleblanc/4711521 to your computer and use it in GitHub Desktop.
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
<?php | |
$options = array( | |
'loop' => false, | |
'autoSlide' => true, | |
'dispItems' => 3, | |
// continue this array with everything you want to set | |
); | |
// Unfortunately, slider_options does become a JS global, but you can cut down on that | |
// by using one global and setting many properties. I'm just doing slider_options to keep | |
// this example succinct. | |
$doc->addScriptDeclaration('var slider_options = ' . json_encode($options)); | |
$doc->addScript(JURI::base(TRUE) . '/modules/mod_yatm/tmpl/js/jquery.carousel.min.js'); | |
$doc->addScript(JURI::base(TRUE) . '/modules/mod_yatm/tmpl/js/script.where.you.use.slider_options.js'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment