- Advertisements from such companies as Add Bright, Adsense and Buysellads.
- Embedding flash – for example: YouTube videos, Video players and games.
- Installing shortcodes.
- Share Icons/widgets such as facebook, linkedin, twitter, etc.
- Printing dynamic content to the screen such as dates, times, user names, etc.
Do you want to try it for yourself? Simply go to http://www.ooso.net/inline-js and download it. It doesn’t get much easier than that and using the tags like above.
1. Wrap Everything in Functions
First wrap everything in functions. If you have to use more than one or two functions, then you probably want to consider an alternative method for employing the scripts in your posts or pages such as a template file or child theme. More advanced users will more likely chose those alternative methods most of the time anyway.
2. Place Function into JavaScrtipt File
Finally insert the function call on the next line in your post or page. It should look something like this: