This is very easy step you can add external javascript or css in head tag of the page.  According to seo you cannot add javascript/css  in the middle of the page.

So here is the code snippet.

$document =& JFactory::getDocument();

$document->addStyleSheet($stylesheeturl.’styles.css’);

$document->addScript($jsurl.’scripts.js’);

Have a happy w3c validate page 🙂

One thought on “How to add external javascript and stylesheet in joomla component”

Leave a Reply to Billigt internet, internet priser, mobilt bredbaand, hurtigt internet, sammenlign internet priser Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.