One of my readers asked me the following question:
When the Script is in an External File
After you have included the file you can use any functions that is defined in that file. Use something similar to the following:
Replace “custom_function();” with the actual name of the function.
Comments (22 responses)
Thank you very much . You really saved me.
@Chris, Maybe the following plugin will help you create a price comparison table:
Thanks for post but super confused. This post starts out by saying its as easy as entering text. That’s not working for me. Then the video lays out like four steps that are required.
I only want a price comparison tool to appear in a single post. Tried a JS plugin and that failed as well. Anyone feel like helping a newbie out? 😉
For site-wide alterations, I always prefer to use a plugin rather than a manual edit, but for a single time need, like when having a special piece of code to add to a specific post or page, then this would work like a treat.
Great tutorial, admin!
Thanks this is so cool
Thank you very much and thank Google for finding this article 🙂
I saved enormous time and finally did what I wanted with JS. Great!
It works well. Thanks for sharing.
I was Looking for this one.. Thank You 🙂
Of course this is done in the header.php but could be altered for the footer
Worked perfectly, thanks!
Yeah you can use that in the header.
But i still have 1 more question about it.
Can i just put that in de bodytag in the header.php?
Thanks in advance
Yeah you can use JQuery inside posts too. As long as you have included the JQuery library in the page you should be fine.
Do you know if it’s possible to use jQuery inside a post? I mean if I wanted to use some of jQuery UI functionality would it be possible?
I am trying to add this function on my wordpress page- its a click to reveal funcition as shown on the link below. Tried everything, cant seem to get it to work on a wordpress page, any ideas?
ok, just remove line breaks from your js code.
” js code line1;
js code line 2;
js code line 3;”
” js code line1; js code line 2; js code line 3;”
I want to run the JS only on spesific page only, do you have any idea how?