Can’t get basic Javascript functions working…please help
-
Hi,
I’m new to the forums and relatively new to WordPress. I’m usually a .Net developer, but WordPress is so good for quickly deploying and easily managing websites and blogs, I like to use it, and recommend it to a lot of people.
The problem i’m having with it though is that I can’t seem to find out where to put my Javascript.
For starters i’d like to just make a simple alert box pop up on each page, just to show it’s working.
I had assumed going into the folder for my active theme and adding the code to the header.php file between the <head></head> tags would do the trick…but no alert box.
I know this may not be the optimal way to do it, but first things first I just want to see a bit of Javascript work in my WordPress site.
Can’t seem to find anywhere that just talks about the basic way to do this (probably as it’s useless other than to test it’s working).
I assumed header.php was just included at the top of all pages that use the theme, but tried adding in some comments to it, and they didn’t appear in the pages when I viewed source even.
I just want to know where I can put my JS code for the alert box to make it work first…Simple question, which i’m assuming has a simple answer.
So any help is really appreciated.
The topic ‘Can’t get basic Javascript functions working…please help’ is closed to new replies.