Well my question is that is it possible to use image swap without having to put a lot of code in the head of the page.
well basically i dont want to defien my images in the head instead i want to define them right before the link and the image it self where it is suppose to swap in and out.

Recommended Answers

All 4 Replies

Script bodies can exist anywhere in your page, if that's your question.

The reason why image objects are defined in the HEAD is to give the user a better experience. They'd rather wait a few seconds up-front, once, for the page to load, than have to wait for an image to load when they rollover a link.

I'll second that.

Thats is exactly what i needed to know.
the main reason i wanted to know that was because i made a php script and i didnt want to re write it to work with JS so what i am gona do now is that i am gona paste the script right before the link and i am gussing that wont mess with the load time.

Ok, let us know how you progress. Please do make an effort to spell-check and proofread your posts here... old folks like me have a hard time reading (and taking seriously) posts with stuff like "i am gona" in them!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.