..::amici::..

everything, anything
 
HomeCalendarPortalFAQGalleryMemberlistUsergroupsSearchRegisterLog in

Share | 
 

 Live Background Previewer Script IE5+ Opr7+

Go down 
AuthorMessage
elmo + actiVe™
moderator
moderator
avatar

Male
Number of posts : 118
Age : 33
Location : Pinas pride
Registration date : 2007-11-18

PostSubject: Live Background Previewer Script IE5+ Opr7+   Sun Nov 18, 2007 8:12 pm

Description: A live background previewer that allows surfers to instantly see how a background image will look like in a document. Click on any of the thumbnail images, and that particular image temporarily becomes the background image for the page. Click anywhere else to restore the document to its original appearance. If you have a graphics site, your surfers will thank you for this added feature!





Step 1: Insert the following into the <body> section of your page:
Code:

<style>
.bgimages img {cursor:hand}
</style>
<script language="JavaScript1.2">
<!--


function tile(){
if (!document.all)
return
var source=event.srcElement
if (source.tagName=="IMG")
document.body.style.backgroundImage="url("+source.src+")"
}

function restore(){
document.body.style.backgroundImage=''
}
document.body.onclick=restore
//-->
</script>

Code:
<span class="bgimages" onClick="tile();event.cancelBubble=true"><img src="image.jpg"><img src="image.jpg"><br><img src="backgr13.jpg"><img src="image.jpg"></span>

Step 2: Finally, wrap the section of your page containing the thumbnails with the below code:

Quote :
<span class="bgimages" onClick="tile();event.cancelBubble=true"><img src="image.jpg"><img src="image.jpg"><br><img src="backgr13.jpg"><img src="image.jpg"></span>

Arrow just change the image.jpg/gif Cool
Back to top Go down
View user profile http://peppermints.co.nr
emo:tan
member
member
avatar

Male
Number of posts : 120
Age : 24
Location : sa bakod ng aming kapit bahay :)
Registration date : 2007-11-24

PostSubject: Re: Live Background Previewer Script IE5+ Opr7+   Sun Nov 25, 2007 10:00 am

tnx for sharing dude...
keep on sharing...
Back to top Go down
View user profile http://www.stickyplanet.forumarena.com
 
Live Background Previewer Script IE5+ Opr7+
Back to top 
Page 1 of 1
 Similar topics
-
» The Carnival of Monkey Island: fanproject needs background artists!
» CCRL live lists with 100 Elo reduction
» The Delfi Affair (live broadcast)
» Chess Script
» LIVE-SCCT FINAL 2011

Permissions in this forum:You cannot reply to topics in this forum
..::amici::.. :: WEB/NET section :: Programming and Tricks-
Jump to: