Results 1 to 3 of 3

Thread: Switch Content Script-change to onmouseover

  1. #1
    Join Date
    Mar 2007
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    1) Switch Content Script:

    2) http://dynamicdrive.com/dynamicindex...tchcontent.htm
    http://dynamicdrive.com/dynamicindex17/switchcontent.js

    Hello everyone, I need some help configuring this script to work on "onmouseover" instead of "onclick"

    basically the way the script works is that you can collapse and de-collapse content by clicking on a link (onclick), and I want to change this behavior to when you hover over the link it expands or collapses

    I figured it shoudl be quite simple to do just look in the .js file for where it talks about "onclick" but apparently i'm not so good at parsing javascript

    I'm more of a php head


    so i'd appreciate of someone coudl point out to me what I need to do or what changes i need to make to the script to let me expand or collapse content based on hover on onmouseover instead of onclick

    ok well i suppose you can ignore the other question
    because I tried this: i replaced all instances of "onclick" to "onmouseover"

    in the switchcontent.js script file

    so my new question is:
    now that it is onmouseover instead of onclick, I would like for it to ALWAYS collapse whenever its done expanding, and never stay open

    so what do I need to change in switchcontent.js in order to do that?
    Last edited by tech_support; 04-11-2007 at 10:00 AM.

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Chill man.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    And this is the code if you still want it:
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

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
  •