Adding our own Javascript into child theme
-
Topic
-
How do I add my own Javascript into Jumpstart? I thought it was as easy as a Custom CSS File…
I am working with my developer. She says this:
I am struggling with couple of issues with js file here. it worked with my custom css file but not with jquery.Firstly I have my custom myScript.js and the jquery-min.js file in the child theme assests/js/myScript.js.
I registerd and enqueued in my function.php file in child theme and also added that in the header.php file between script tags also .
But for some reason It is linking to my parent theme.
secondly if
it’s pulling the js from my parent jump start theme it is not even executing the first jquery line from there too.
For now, I just have an alert statement to test…it’s not taking that.If you need any file to look at it. please let me know. Thanks again for your help.
jQuery(document).ready(function(){
alert(‘test’);
});
- You must be logged in to reply to this topic.