Add Css and Javascript inside Joomla Component

Hi Friends,

I you want to include external css andjavascript in your Joomla component then you can use following code.


$document = JFactory::getDocument();

//  For javascript or jquery file

// For include css file


If you want to include images in  your component the you can use following code

<img src="<?php echo JURI::root();?> path">
<img src="<?php echo JURI::root();?>components/component_name/images/images1.png">
Categories: Joomla | Tags: , , , , , , | 3 Comments

Post navigation

3 thoughts on “Add Css and Javascript inside Joomla Component

  1. I every time emailed this web site post page to all my contacts, because if like to read it then my links will too.

  2. Good post! We aree linking to this particularly great article on our website.
    Keep up the great writing.

  3. Magnificent beat ! I wish to apprentice whilst you amend your web
    site, how can i subscribe for a blog web site?The accoun helped me a appropriate deal.

    I were tiny bit familiar of this your broadcast provided brilliant clear concept

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

%d bloggers like this: