But I dont know whats wrong with the Hamburger menu is not animating on the click. I believe that the animation is not governed by JS, the only thing that JS govern is that on clicking the hamburger it should be producing the drop down. whats wrong I couldn’t understand even after wasting many hours.
The animation works on the toggle class of open. Yes, the css is there for this, but the html has no open class attached, or nothing to trigger it. Add the jq and the menu should animate.
I don’t know if your php is working, or not, but you want to be loading the library before the custom jq script. If it doesn’t work then, I would add the library and script to the html to test that it works from there. If it works from the html, then you know it’s the loading of the scripts that’s failing and that’s a thread for the php forums.
I am unable to find the flaw. I dont know whats the mistake →
// Register the script like this for a theme:
wp_register_script( 'custom-js', get_template_directory_uri() . '/js/custom.js', array( 'jquery' ), '1.0', true );
wp_enqueue_script( 'custom-js' );
Seems to be loading fine now. Theres either a conflict with another library, or custom.js is loading before the library. Try changing custom.js to the following