I am trying to add elastislide, for that, I added this code in phtml file
<div class="brand_block">
<ul id="carousel_<?php echo $chunk2->getId(); ?>" class="elastislide-list">
<?php
print($_category->getData('brand_block'));?>
</ul>
<script type="text/javascript">
require(['jquery','js/jquery.elastislide','js/modernizr.custom.17475'],
function (jQuery) {
jQuery(document).ready(function(){
jQuery('#carousel_<?php echo $chunk2->getId(); ?>').elastislide();
});
});
</script>
I've added modernizr.custom.17475.js and jquery.elastislide.js in /app/design/frontend/vendor_name/theme_name/web/js
folder
I am getting these errors in console
Uncaught ReferenceError: jQuery is not defined at jquery.elastislide.js:820 (anonymous) @ jquery.elastislide.js:820 (index):296 Uncaught TypeError: jQuery(...).elastislide is not a function
jQuery
with$
in your script code