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

  • Home
  • SEARCH
  • 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 8040863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:01:58+00:00 2026-06-05T04:01:58+00:00

I know, thanks to this tutorial , how to dynamically load jQuery (such as

  • 0

I know, thanks to this tutorial, how to dynamically load jQuery (such as calling <script src="/widget/widget.js?type=normal" type="text/javascript"></script>) if the host website doesn’t have it :

(function () {
    var jQuery;

    if (window.jQuery === undefined || window.jQuery.fn.jquery !== '1.4.2') {
        var script_tag = document.createElement('script');
        script_tag.setAttribute("type", "text/javascript");
        script_tag.setAttribute("src", pathWidget + "/scripts/jquery-1.7.min.js");

        if (script_tag.readyState) {
            script_tag.onreadystatechange = function () { // For old versions of IE
                if (this.readyState == 'complete' || this.readyState == 'loaded') {
                    scriptLoadHandler();
                }
            };
        } else {
            script_tag.onload = scriptLoadHandler;
        }
        (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag);
    } else {
        jQuery = window.jQuery;
        main();
    }

    function scriptLoadHandler() {
        jQuery = window.jQuery.noConflict(true);
        main();
    }

    function main() {
        jQuery(document).ready(function ($) {

        });
    }
})();

Well, now I’d like to do the same things for a jquery library. Let’s says jQuery Cycle.

I’ve tried with :

var script_cycle = document.createElement('script');
script_cycle.setAttribute("type", "text/javascript");
script_cycle.setAttribute("src", pathWidget + "/scripts/jquery.cycle.all.js");

after :

script_tag.setAttribute("src", pathWidget + "/scripts/jquery-1.7.min.js");

but when I load the cycle into the document ready, I get this error :

$("#myRotator").cycle is not a function

Where am I wrong?

  • 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-06-05T04:01:59+00:00Added an answer on June 5, 2026 at 4:01 am

    try to check if the plugin is loaded:

    if(!jQuery().cycle) {
      var script_cycle = document.createElement('script');
      script_cycle.setAttribute("type", "text/javascript");
      script_cycle.setAttribute("src", pathWidget + "/scripts/jquery.cycle.all.js");
      (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_cycle);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Thanks to this excellent tutorial , I know how to read a string (in
I have used a tutorial http://www.devcurry.com/2010/06/load-page-dynamically-inside-jquery-ui.html to dynammically load an aspx page into a
Thanks for looking at this question. I wanted to know how can I use
Does anybody know whether one exists? I've been googling this for monthes... Thanks
I get a segmentation fault when running this code. Anyone know why? Thanks. #include
Do you know some good jQuery popup dialog plugins? Thanks.
I have the following code to test the menu button : <script type=text/javascript cahrset=utf-8>
Following a C tutorial , I've encountered a type dependency that I don't know
I know how to create and apply styles and themes thanks to http://developer.android.com/guide/topics/ui/themes.html .
I know its possible to accept a list of objects as a parameter thanks

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.