Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript What am i doing wrong? Jquery w/ mouseover

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #36412
    JohnMotylJr
    Participant

    My goal is when someone hovers over the id of “btnHome” the body background color will change to the same color as “btnHome”

    html:








    css:


    body {
    background:#696969;
    }
    .nav-button {
    width:176px;
    height:150px;
    float: left;
    font-family:helvetica;
    text-align:center;
    font-size:20pt;
    color:white;
    }
    #btnHome {
    background:#1E90FF;
    height:80px;
    padding-top:50px;
    display:none;
    margin:10px 5px 10px 10px;
    }

    The display none is for another jquery function,a simple load slidedown



    I am very stumped, i am not to strong with jquery, any help?

    #95736
    JohnMotylJr
    Participant

    Oh wow, no way i spelt function wrong.. lol thanks

    #95737
    JohnMotylJr
    Participant

    Well i had fixed my spelling, it is working in jsfiddle but not in the browser…? (Chrome latest version.)

    How do i give it a mouseout or return false; to get back to its original color value?

    http://jsfiddle.net/jD9F6/1/

    #95744
    JohnMotylJr
    Participant

    @Senff,

    If you copy all those into an html file will it do the same. I cannot get it to work inside my browser, but it will work in JSFiddle ?

    #95746
    JohnMotylJr
    Participant

    Got it, the functions must be inside of the onload functions



Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.