View Full Version : Resolved Swap background image without refreshing?

03-20-2012, 02:48 PM
Hey everyone,

I'm just trying to figure out if it is possible to swap the pages background image when a button is clicked without refreshing the page? I've looked around and can't really find anything helpful.

Any tips or pointers in the right direction would be much appreciated



03-20-2012, 02:53 PM
All you need is an onclick event handler on the button which calls a javascript function which then changes the background image css style for the <body>

There's heaps of examples on the www on how to use javascript to change css styles.

03-20-2012, 03:01 PM
Fantastic, thank you for that. A simple and quick search for javascript CSS change gave me exactly what I needed. Thanks!

03-20-2012, 03:03 PM
glad you sorted it out :thumbsup: