I am using this code at footer for Eliminate render-blocking resources
<script async or defer src="/jquery.js">
/* custom code */
<script>
$(document).ready(function(){
$('.menu-bar').click(function(){
$('.nav-bar').slideToggle();
});
$('.dropdown').click(function(){
$(this).toggleClass('inDrop');
$('.dropdown-menu').slideToggle('slow');
});
});
</script>
Now I am getting Uncaught ReferenceError: $ is not defined error.
what is best way to use Asynchronous / Deferred JavaScript
src. They need to be separate<script>tags.asyncif you need to use the library in another script tag.