Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1090037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:18:49+00:00 2026-05-16T23:18:49+00:00

i have a custom joomla template which i load jquery in using the normal

  • 0

i have a custom joomla template which i load jquery in using the normal <script></script> tages. I have installed a plugin which also loads jquery, meaning that jquery is being loaded twice. the plug in is only loaded on a few pages but i require jquery on every page so can’t take it out the template. what is the best way to stop it loading jquery twice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:18:50+00:00Added an answer on May 16, 2026 at 11:18 pm

    Use this javascript code///

    if (typeof jQuery == 'undefined') {   
        var head = document.getElementsByTagName("head")[0]; 
       script = document.createElement('script'); 
       script.id = 'jQuery'; 
       script.type = 'text/javascript'; 
       script.src = 'js/jquery.js'; 
       head.appendChild(script); 
    } else { 
        // jQuery is loaded already need not include it...
    
    }
    

    typeOf operator checks if the jQuery object already exists if it does not exist then create a script element and append it to head of the html.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just launched a site (using Joomla and a custom template), which doesn't
im using a joomla 1.6.4 install and have a custom css/javascript drop-down menu in
I'm using Joomla 1.5. I have created a custom component that pulls data out
I am using Joomla 1.5 . I have developed a custom component that's basically
I have created custom component and a route plugin for Joomla 1.5 to to
Using Joomla vers. 2.5 I have a Custom Html like that : <table border=0
I have custom Rythm template tag (sayHi.html) which I want to call from parent
I have a custom component built for a Joomla 2.5 website. It is working
We have custom headers in the Silverlight DataGrid using the ContentTemplate. We've got a
I have a custom Joomla component and a router for building my SEF URL's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.