Guest Posted June 17, 2014 Share Posted June 17, 2014 (edited) Hey guys, I can't figure out why this code won't work for displaying script tags to go alongside the js added for the module I am creating. Any advice would be greatly appreciated! public function headerHTML() { $html = ' <script type="text/javascript"> $(document).ready(function() { $("#owl-example").owlCarousel({ autoplay: true }); }); </script> '; return $html; } Edited June 17, 2014 by Guest (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 17, 2014 Share Posted June 17, 2014 how you calling this function? and where? Link to comment Share on other sites More sharing options...
Guest Posted June 18, 2014 Share Posted June 18, 2014 (edited) Hey vekia, I'm actually a little confused. This function is in my press.php file (the name of the module is press) and I don't understand how to call the function. Do I need to extend a controller? I can't find out how the other modules do it. Where are all these functions being called form in general? The controllers? **Sorry, I'm in the process of learning PHP right now. Edited June 18, 2014 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now