Loading header_required, and other javascript libraries
Permalink
My theme loads quite a few javascript files that depend on jQuery.
If I write this line above my scripts:
I get the error message:
And my edit bar does not work (the edit button does not appear, nor does the "Dashboard" button.
If however I write that line below my scripts:
Then my edit bar and dashboard work, but now none of my custom scripts work because they rely on jQuery.
Any advice?
If I write this line above my scripts:
<?php Loader::element('header_required'); ?> <!-- note, did not include my own jQuery since that's in the header element of concrete5 --> <script type="text/javascript" src="<?php echo $themepath; ?>/js/custom.js"></script>
I get the error message:
ccm.app.js line 1: Uncaught TypeError: Property '$' of object [object DOMWindow] is not a function pages control menu.js line 70: Uncaught TypeError: Property '$' of object [object DOMWindow] is not a function
And my edit bar does not work (the edit button does not appear, nor does the "Dashboard" button.
If however I write that line below my scripts:
<script type="text/javascript" src="<?php echo $themepath; ?>/js/custom.js"></script> <?php Loader::element('header_required'); ?>
Then my edit bar and dashboard work, but now none of my custom scripts work because they rely on jQuery.
Any advice?
Getting rid of the jQuery noConflict() helped.