+ Reply to Thread
Results 1 to 3 of 3

Thread: Button Effect - Javascript

  1. #1
    plecosword is offline x10Hosting Member plecosword is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    11

    Button Effect - Javascript

    I Don't know any javascript and I need to make the navigation button change a repeated image when it its hovered and another when clicked on. A lot like the buttons from the apple site, at the top.
    :drool:
    Edit:
    anyone?
    Last edited by plecosword; 09-26-2009 at 10:06 AM. Reason: Automerged Doublepost

  2. #2
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: Button Effect - Javascript

    This is done using CSS.

    Here is the code:
    Code:
    a.swap {
    background-image:url(image1.jpg);
    }
    
    a.swap:hover {
    background-image:url(image2.jpg);
    }
    HTML Code:
    <a href="#" class="swap">The actual link</a>
    Last edited by xav0989; 09-26-2009 at 10:31 AM.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  3. #3
    plecosword is offline x10Hosting Member plecosword is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    11

    Re: Button Effect - Javascript

    Thanks, it works, but it only changes the background behind the txt, not the whole button. Im guessing I will either have to create the full size image for the button rather than having it repeating, or use Javascript

+ Reply to Thread

Similar Threads

  1. drop down menus with JavaScript disabled?
    By sifaka in forum Free Hosting
    Replies: 1
    Last Post: 05-15-2008, 10:46 AM
  2. javascript and external javascript files problem
    By delon in forum Programming Help
    Replies: 6
    Last Post: 04-27-2008, 12:41 AM
  3. Flash button for 50 Credits:
    By satheesh in forum The Marketplace
    Replies: 4
    Last Post: 01-25-2008, 08:43 AM
  4. Firefox 'Back' Button Problems
    By GG-Xtreme in forum Off Topic
    Replies: 3
    Last Post: 12-14-2007, 10:55 PM
  5. XML and Javascript
    By cuteboytm in forum Graphics & Webdesign
    Replies: 1
    Last Post: 09-21-2007, 10:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers