Welcome to the Graphic and Web Design Forum


your forum for all things Design


  •  » Graphic Design
  •  » Web Design
  •  » Logos and Branding
  •  » Illustration
  •  » Photography
  •  » Design Tutorials
  •  » Plenty of Off Topic Chat

Register now to remove this ad box


YES! I want to register an account for free right now!


-->
  1. #1

    using two scripts in one page


    REGISTER TO REMOVE ADS


    Helo, I am having some problems building a page.

    I found a nice script that I can use to have the same effect of the dock of macs. It works great. The problem is that the width of the images I use is bigger than that of the screen. As a result I get an annoying horizontal scroll bar at the bottom.

    So I tried to use another script that will scroll automatically left and right when I hover the edges of the screen. I had no luck, it seems that the two scripts cannot work together... I don't know javascript, i've just used some scripts two or three times, so I cant imagine what could be wrong. I just need to do this.
    I can leave it with the scroll bar, but if you have any suggestions... all welcome...

  2. #2
    Toon's Avatar
    Join Date
    Jan 2007
    Location
    Sheffield, UK
    Posts
    26,145
    Blog Entries
    46

    My Social Networking

    Follow Toon On Twitter Add Toon on Facebook Add Toon on Google+
    Add Toon on Linkedin Follow Toon on Flickr Visit Toon's Youtube Channel
    What scripts are they prototype.js clashes with alot of other scripts

  3. #3
    I don't fully understand your question, but the dock uses the jquery library and the other uses mootools, I don't know if this helps...

  4. #4
    Toon's Avatar
    Join Date
    Jan 2007
    Location
    Sheffield, UK
    Posts
    26,145
    Blog Entries
    46

    My Social Networking

    Follow Toon On Twitter Add Toon on Facebook Add Toon on Google+
    Add Toon on Linkedin Follow Toon on Flickr Visit Toon's Youtube Channel
    Do you know what elements of mootools and jquery? As in when you select your elements in mootools which did you check

  5. #5
    well I didn't select any elements, or at least that's what I think...

    the dock script links to a jquery file with lots of code I don't understand
    and then there is this:

    <script type="text/javascript">

    $(document).ready(
    function()
    {
    $('#dock').Fisheye(
    {
    maxWidth: 50,
    items: 'a',
    itemsText: 'span',
    container: '.dock-container',
    itemWidth: 75,
    proximity: 80,
    halign : 'center'
    }
    )
    }
    );
    </script>

    the other script links to a similar file and I use this on my page:

    </style>
    <script type="text/javascript" src="js/mootools.svn.js"></script>
    <script type="text/javascript">
    window.addEvent('domready', function(){
    var scroll2 = new Scroller('container', {area: 100, velocity: 1});

    // container
    $('container').addEvent('mouseover', scroll2.start.bind(scroll2));
    $('container').addEvent('mouseout', scroll2.stop.bind(scroll2));
    });
    </script>

    ...I feel a little stupid but I hope I will learn to write code on my own one day...

  6. #6
    Toon's Avatar
    Join Date
    Jan 2007
    Location
    Sheffield, UK
    Posts
    26,145
    Blog Entries
    46

    My Social Networking

    Follow Toon On Twitter Add Toon on Facebook Add Toon on Google+
    Add Toon on Linkedin Follow Toon on Flickr Visit Toon's Youtube Channel
    I would suggest using a complete mootools solution, try some of the menus here...

    Nice List of Open Source Fish Eye Menu | Web Resources | WebAppers

    There are some mootools ones, I think sometimes the jquey scripts and mootools scripts clash to do with the way they are stacked, especially if they both have an onload function working at the same time.

    This is not gospel just my personal opinion

  7. #7
    tr0y's Avatar
    Join Date
    Jul 2008
    Location
    Seattle, Wa
    Posts
    174

    REGISTER TO REMOVE ADS


    I have also experienced clashes with jquery and mootools, one problem is that they both use "$" is two very different ways. Mootools only lets a single element selector within $, asking you to create an array in a different way, whereas jquery will accept a single element or an array with $. i would totally suggest mootools, but its my drug of choice at the moment, so maybe you shouldn't just take an addicts word

Similar Threads

  1. Image Hosting Scripts
    By dannynosleeves in forum General Web Design Forum
    Replies: 1
    Last Post: 17-05-2008, 05:28 AM
  2. ...what about scripts?
    By gabrielhml in forum Graphic Design and Web Design Help
    Replies: 5
    Last Post: 04-04-2008, 08:31 AM
  3. Replies: 6
    Last Post: 14-03-2008, 02:44 AM
  4. wordpress scripts & beef
    By PolarBear in forum General Web Design Forum
    Replies: 3
    Last Post: 22-09-2007, 02:53 PM

Posting Permissions

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

Log in

Log in