If you want to add JavaScript and/or JQuery functionality, and you want to easily reuse the codes in your future projects, it would be better to put in in a JQuery plugin. In other words, you will create a new JQuery plugin that you can reuse or share to other web developers. Also, putting your scripts inside a function will prevent conflicts with other scripts.

[insert-code id=1]

To call your jQuery plugin, simply add the ff. line of codes

[insert-code id=2]

 

Leave a Reply