Results 1 to 4 of 4

Thread: Script wont load

  1. #1
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Script wont load

    Hi,
    pls i have two script that i want to load on my page but the two just wont work together. one a javascript and the other a jquery. i have used the jquer.noConflict() but it still didnt work. pls how can i get it to work.
    this is the head section of the pagei want it displayed.
    Code:
    <link rel="stylesheet" href="styles.css" type="text/css" />
    <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
    <script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.slidepanel.setup.js"></script>
    <script type="text/javascript" src="scripts/jquery.cycle.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.cycle.setup.js"></script>
    <script type="text/javascript">
    jQuery.noConflict();
    </script>
    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="js/lightbox.js"></script>
    ps: i didnt modify any of the script. i left it as is.

    thanks

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    Maybe this thread could be of help. Otherwise you could use a jquery based lightbox clone like slimbox2 or fancybox to avoid the conflict.

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    colorbox is another good jquery plugin.

    I would recommend using a jquery lightbox over trying to solve the conflicts in this case - unless there's something that absolutely depends on prototype/scriptaculous, you'll drastically reduce the amount of scripts you need to load by using only one library.

    (Also, all of the scripts you mention are "javascript." jQuery is a javascript function library, just like prototype is. They're not different scripting languages.)

  4. #4
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I finally got it working. from an old thread from john. he said I should change the $ of my setup files to jquery and to update my jquery file to 1.6.x. after that it worked. but I discovered two things first after getting my page to load properly, I decided to do a little tweaking. I removed the jquery.noscript and it still worked. secondly I also used my old jquery script (1.4.x) it also worked. I now realize that what really did the magic is changing the $ sign of my setup files to jquery.

    thanks and hope this helps someone.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •