Results 1 to 6 of 6

Thread: Onmouse hover not working on

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

    Unhappy Onmouse hover not working on

    1) Script Title: Switch Content I

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

    3) Describe problem:
    Trying to find a way for hover to work,. but no matter what i do i cannot get it to function i have tried this and many other variations.. can you help me ? I'm im not having a stupid moment

    Code:
    <script type="text/javascript" src="http://www.dynamicdrive.com/dynamicindex17/switchcontent.js" ></script>
     <style type="text/css"> 
    .handcursorsub
    {
    cursor:hand;
    cursor:pointer;
    color: #E8E8E8;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 10px;
    text-decoration: none;
    }
    .handcursorsubhover
    {
    cursor:hand;
    cursor:pointer;
    color: #92C7F2;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 10px;
    text-decoration: none;
    }
    </style>
    </head>
    <body>
    
    <span id="1-title" onmouseover="this.className='handcursorsubover'"
     onmouseout="this.className='handcursorsub' onClick="Toggle(this)">foo foo has a question</span>
    <div id="1" class="faq"><h5> 
    bar bar has a answer
    </h5></div>
    <script type="text/javascript">
    // MAIN FUNCTION: new switchcontent("class name", "[optional_element_type_to_scan_for]") REQUIRED
    // Call Instance.init() at the very end. REQUIRED
    
    var faq=new switchcontent("faq", "div") //Limit scanning of switch contents to just "div" elements
    faq.setStatus('', '')
    faq.setColor('white', 'white')
    faq.setPersist(false)
    faq.collapsePrevious(true) //Only one content open at any given time
    faq.defaultExpanded()
    faq.init()
    </script>
    but with no success

  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

    Code:
    <script type="text/javascript" src="http://www.dynamicdrive.com/dynamicindex17/switchcontent.js" ></script>
     <style type="text/css"> 
    .handcursorsub
    {
    cursor:pointer;
    color: #E8E8E8 !important;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 10px;
    }
    .handcursorsubhover
    {
    cursor:pointer;
    color: #92C7F2 !important;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 10px;
    }
    </style>
    </head>
    <body>
    
    <span id="1-title" class="handcursorsub" onmouseover="this.className='handcursorsubhover'"
     onmouseout="this.className='handcursorsub'" onClick="Toggle(this)">foo foo has a question</span>
    <div id="1" class="faq"><h5> 
    bar bar has a answer
    </h5></div>
    <script type="text/javascript">
    // MAIN FUNCTION: new switchcontent("class name", "[optional_element_type_to_scan_for]") REQUIRED
    // Call Instance.init() at the very end. REQUIRED
    
    var faq=new switchcontent("faq", "div") //Limit scanning of switch contents to just "div" elements
    faq.setStatus('', '')
    faq.setColor('white', 'white')
    faq.setPersist(false)
    faq.collapsePrevious(true) //Only one content open at any given time
    faq.defaultExpanded()
    faq.init()
    </script>
    - John
    ________________________

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

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

    Question

    still cannot get that to work? did you have success with that code?

    here the page i have been trying to get it to work on

    http://heroesmf.com/v2/visitors.php

  4. #4
    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

    Yes...
    - John
    ________________________

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

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

    Default

    ahh yes it does in a stand alone file.. what do you think my be causeing the css not to work with the css styles in my header? in http://heroesmf.com/v2/test.php

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

    Default

    oops had santax error,. thanks for your help

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
  •