/    Sign up×
Community /Pin to ProfileBookmark

Can’t pass CSS into javascript (I think)

I’m trying to add a javascript background changer to my landing page. thewesterfields.net

The changer works fine but it is ignoring the css that makes the background always fill the page.

I not sure what is happening but it seems that the css isn’t getting into (or out of) the script.

The original index can be found at [URL=”http://thewesterfields.net”]thewesterfields.net[/URL]

The on I am working on can be found @ [URL=”http://thewesterfields.net/index1.html”]thewesterfields.net/index1.html[/URL]

Thanks

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@3NexMay 13.2010 — Could you further elaborate on how to trigger the background changing, what should happen on trigger and what happens instead? I can't seem to find the problem, because the only background changing I see are the two links in the middle which seem to be working fine :/
Copy linkTweet thisAlerts:
@cwesterfieldauthorMay 13.2010 — Absolutely, the background should be random for each page load. Everytime you hit refresh, there should be one of four backgrounds.

The rotation (on index1.html) works fine, but the css doesn't.

Resize the window on index.html and then again on index1 and you should see what I mean.
×

Success!

Help @cwesterfield spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...