hi
i write a simple script to select parent nav-item of a dropdown-item and set it active
$('.active').parent().parent().children(".nav-link").addClass("active");
but get this error
Uncaught ReferenceError: $ is not defined
You seem not to have loaded first the Jquery library. Make sure you included it before the call.
@ChriStef require.js is included on the head, i use blank page of tabler demo
Did you put your code in require block? Just like this:
require(['c3', 'jquery'], function (c3, $) {
$(document).ready(function() {
// Your code goes here
});
});
@tdtgit no, thank u
Hope your problem solved.
Most helpful comment
Did you put your code in
requireblock? Just like this: