/    Sign up×
Community /Pin to ProfileBookmark

Image Preload for Rollover Effect

I have side-buttons used in a rollover effect from a website i am working on. I have an image preload script that is not working, and I am about to create my own image preloader if I can’t find out why it’s not working. The images are loaded as backgrounds of div tags. Also, I need to get rid of the title attributes on these, since they are not being used in the correct way. If it’s hard to determine how the images are loaded on them in the first place, it’s because I have javascript automatically detect the screen’s resolution and thus load the correct images, by changing the className accordingly on each tag. Currently, the template will only load in Internet Explorer and Firefox and I will be working on another template that will be hardcoded into each page for W3C-Compatibilty. The template simply loads the content from the other pages into it.

All I need is an image preloader that will work with the side-buttons, thanks in advance if you find a solution. Otherwise I will have to resort to loading the images out of the viewable area of the page, so that they are loaded with the page. The website is located at [url]http://threekordkillers.blackapplehost.com/[/url] and here is the code for the side-buttons:

[CODE]<div cls=”chg3″>
<div ID=”sidebuttons” onmouseout=”doHl()”>
<div cls=”homebutton” linkto=”/pages/home.html” title=”false” onmouseover=”doHl(this)” onclick=”loadSBtn(this)”></div>
<div cls=”eventsbutton” linkto=”/pages/events.html” title=”false” onmouseover=”doHl(this)” onclick=”loadSBtn(this)”></div>
<div cls=”membersbutton” linkto=”/pages/members.html” title=”false” onmouseover=”doHl(this)” onclick=”loadSBtn(this)”></div>
<div cls=”contactbutton” linkto=”/pages/contact.html” title=”false” onmouseover=”doHl(this)” onclick=”loadSBtn(this)”></div>
<div cls=”pnvbutton” linkto=”/pages/pixnvids.html” title=”false” onmouseover=”doHl(this)” onclick=”loadSBtn(this)”></div>
<div cls=”songsbutton” linkto=”/pages/songs/songs.php” title=”false” onmouseover=”doHl(this)” onclick=”loadSBtn(this)”></div>
</div>[/CODE]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @TheTeenScripter 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.3,
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,
)...