Javascript error on page controls
Permalink
Hi All
I'm trying to add a jquery slider to a responsive theme I've built, the plugin works fine apart from the fact its stripping out the page controls in edit mode. I'm guessing its a conflict between the jquery on the page and the internal ui. The errors I get are
The siteshttp://79.170.44.138/woodrowmercer.com/... and you only get one error when not logged in! Its a little bit beyond my jquery skillset to be honest... any help in solving this would be muchly appreciated.
I'm trying to add a jquery slider to a responsive theme I've built, the plugin works fine apart from the fact its stripping out the page controls in edit mode. I'm guessing its a conflict between the jquery on the page and the internal ui. The errors I get are
Uncaught TypeError: Cannot read property 'widget' of undefined ccm.app.js:3 Uncaught TypeError: Property '$' of object [object Object] is not a function page_controls_menu_js:65 GET http://79.170.44.138/woodrowmercer.com/themes/WoodrowTheme/img/navselect.gif 404 (Not Found) /woodrowmercer.com/themes/WoodrowTheme/img/navselect.gif:1
The siteshttp://79.170.44.138/woodrowmercer.com/... and you only get one error when not logged in! Its a little bit beyond my jquery skillset to be honest... any help in solving this would be muchly appreciated.
Hi innotix
Thanks for the reply? Which view file do I try this on? So many view files in concrete5! :)
Thanks for the reply? Which view file do I try this on? So many view files in concrete5! :)
Hi
In your Slider-Plugin you've built. You may not show your javascript in the Edit-Mode.
path: packages/YOURSLIDERPLUGIN/block/yourslider/view.php
example of my bootstrap slider
In your Slider-Plugin you've built. You may not show your javascript in the Edit-Mode.
path: packages/YOURSLIDERPLUGIN/block/yourslider/view.php
example of my bootstrap slider
<?php if ($u->isLoggedIn ()) { ?> <!-- do nothing --> <?php } else { ?> <script type="text/javascript"> $(document).ready(function() { //JQUERY PLUGIN EXAMPLE: $('#gallery<?php echo $bID ?>').carousel({ interval: 3000 }); }); </script> <?php }?>
Try this in your view.php: