Forums

Button to swap the WordPress Custom Background Image. (1 post)

  1. csonnenb
    Member
    Posted 1 year ago #

    Objective:
    Create two buttons that will change the WordPress custom background image on the fly.

    Requirements:
    - The function must be available for any user of the site.
    - Onclick button '1' must display image 'a.' If the image is already displayed, the button shouldn't do anything when clicked again.
    - Onclick button '2' must display image 'b.' If the image is already displayed, the button shouldn't do anything when clicked again.

    I have tried using JavaScript following the tutorial at the codebelly site: http://www.codebelly.com/javascript/backimagechange.html, but it does not work.

    I'm a newb (css/html only). Can someone provide a step-by-step instructions on how to accomplish this?

Topic Closed

This topic has been closed to new replies.

About this Topic