Results 1 to 3 of 3

Thread: different scripts with jQuery

  1. #1
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question different scripts with jQuery

    1) Script Title:

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...agscroller.htm

    http://www.dynamicdrive.com/dynamici...edcollapse.htm

    3) Describe problem:

    I try to use two of the scripts above in one page and one of them didn't work, i figured that the problem is because both scripts are using jQuery lib,
    please help, anyone knows how can i fix it?



    here is the code:


    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript" src="animatedcollapse.js">

    /***********************************************
    * Animated Collapsible DIV v2.4- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
    ***********************************************/

    </script>


    <script type="text/javascript">

    animatedcollapse.addDiv('cat', 'fade=0,speed=400,group=pets,hide=1')
    animatedcollapse.addDiv('dog', 'fade=0,speed=400,group=pets,hide=1')
    animatedcollapse.addDiv('rabbit', 'fade=0,speed=400,group=pets,hide=1')


    animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted
    //$: Access to jQuery
    //divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
    //state: "block" or "none", depending on state
    }

    animatedcollapse.init()

    </script>


    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script src="sagscroller.js">

    /***********************************************
    * SAG Content Scroller- Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/

    </script>
    <script>

    //SAG scroller #1:

    var sagscroller1=new sagscroller({
    id:'mysagscroller',
    mode: 'manual' //<--no comma following last option
    })


    </script>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Change the first one as shown:

    Code:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
     <script type="text/javascript" src="animatedcollapse.js">
    
     /***********************************************
     * Animated Collapsible DIV v2.4- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
     * This notice MUS . . .
    And get rid of the second highlighted one:

    Code:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
     <script src="sagscroller.js">
    
     /***********************************************
     * SAG Content Scroller-  Dynamic Drive DHTML code library (www.dynamicdrive.com)
     * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
     * This notice must s . . .
    That should do it. But there also could be other problems. If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you so much John!!!
    it works great now!

    thanks
    yaron

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
  •