|
|
Question : Change background image and corresponding photo at same time on refresh
|
|
I am having trouble getting my background image to change in concert with a photo on my page.
I have 5 background images, each one corresponds to a different photo. I'd like these to change together on refresh.
I have the following code but am not sure what is going on that is causing it not to work. The image named "ImageHolder" is the one that needs to change in concert with the background image. The "ImageHolder" image is changing on refresh, but the backgroudn image is not.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
|
|
Open in New Window
Select All
|
Answer : Change background image and corresponding photo at same time on refresh
|
|
This is better code
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
|
|
Open in New Window
Select All
|
|
|
|