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 🙂

2 thoughts on “How to add external javascript and stylesheet in joomla component”

  1. Hi blogger, i must say you have hi quality posts here.

    Your page should go viral. You need initial traffic only.
    How to get it? Search for; Mertiso’s tips go viral

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.