/    Sign up×
Community /Pin to ProfileBookmark

can this be changed to display a different image rather than linking to seperate css

[url]http://javascript.internet.com/css/style-sheets-by-resolution-2.html[/url]
Can the script at above link be modified to display different images rather than link to another style sheet?
I would have thought just placing it in the body and changing the code to

[CODE]if (winW <= 1024) {
document.write(‘<img src=”image1.jpg”>’);
}
if (winW <= 800) {
document.write(‘<img src=”image2.jpg”>’);
}[/CODE]

would do the trick but I just wanted to check if this is the best way to do things or if there is another way. The site I want to use it for is [url]www.ufreak.net/new[/url] and you’ll be able to see the images at the side there which will need changed.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Dopple 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.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...