Make script block optional via settings
-
Hello,
Great plugin – I do have a suggestion though:
It would be very useful if you could choose, from within the carousel settings, if you wish to control the carousel with data-attributes or the script block. In the theme we are working on the script block found on line 746 of cpt-bootstrap-carousel.php causes a javascript error since bootstrap is loaded in the footer:
<script type="text/javascript"> jQuery(document).ready(function() { jQuery('#cptbc_<?php echo $id; ?>').carousel({ interval: <?php echo $atts['interval']; ?> }); }); </script>As it’s possible to set the interval with a data attribute e.g. data-interval=”” http://getbootstrap.com/javascript/#carousel-options I would propose it is either replaced with a data attribute or at least controlled from within the settings page.
Many thanks
The topic ‘Make script block optional via settings’ is closed to new replies.