Login/Register Home   Account   Popular Downloads   Reviews   Galleries   News   Forum   Top 15
 
New Electronics
Product Image    Product Image    Product Image    Product Image    Product Image    Product Image    Product Image    Product Image    Product Image    Product Image    
 
Modules
Home
Home
Account
Products
General
Community
Media
Support
Tools
Twitter Tweets
Resources
 
Web Stats
We received
page views since
May, 2006

[ More ]
 
Donate Now
Find our service's and script's useful? Make a small donation to show your support.

 Recent Donations:
 01. Guest (01-07 - $10)
 
Downloads New
01: WelcomePM
02: snap preview
03: Reflections Install
04: shellmt.dll
05: Days to Christmas an
06: Film Strip Cats
07: Mercs CPU Voice Audi
08: MWL Map Pack 3
09: mektek Zone Update 1
10: ZoneFix
11: Bot Names 1.1.exe
12: mektek Zone Update 1
13: InnerSphereSafeCast
14: ClanSafeCast Repair.
15: BKV Map Pack
16: MWL Map Pack 2
17: MWL Map Pack 1
18: DEA1058
19: Wolfshead and Wolfsh
20: Worthing
 
Tutorials

Mechwarrior 4


 Training
 Lag and Hackers




Tutoriaux
 
Angel One Links
Link back to
Angel One
Click here to download our link!


Click here to download our link!


Click here to download our link!


Click here to download our link!


Click here to download our link!


Click here to download our link!


Click here to download our link!


Click here to download our link!



Click here to view
all of our buttons.


Resources

USA MW4 Clan


#MoD#


 
reflection.js

reflection.js

Reflection.js 1.6 allows you to add reflections to images on your webpages. It uses unobtrusive javascript to keep your code clean.

It works in all the major browsers - Internet Explorer 5.5+, Mozilla Firefox 1.5+, Opera 9+ and Safari. On older browsers, it'll degrade and your visitors won't notice a thing. Best of all, it's under 5KB.

Contents

Setting Up

Upload reflection.js and prototype.js and include them into your webpage.

<script type="text/javascript" src="reflection.js"></script>

Using It

To add a reflection just add a class="reflect" to the image. View source to see example.

Example Image

The reflection will automatically fade into the background colour.

If you run a forum, you can modify your templates and add class="reflect" to the avatar HTML code to add reflections.

Customizing Reflections

By default, the reflection will have a height 50% of the original image. Thus the height of an image with a reflection will be 1.5 times the height of the original image. The default opacity of reflections is 50%.

  • Varying the Height
    You can vary the height of a reflection by adding rheight followed by the desired height in percent to the CSS class list.

    To use a reflection 33% the height of the original image:

    class="reflect rheight33"

    Example:

    class="reflect rheight33" class="reflect rheight66" class="reflect rheight100"

    Tip: Especially for larger photographs, small reflections work really well (try 10%).

  • Varying the Opacity
    You can vary the opacity of a reflection by adding ropacity followed by the desired opacity in percent to the CSS class list.

    To use a reflection with 30% opacity:

    class="reflect ropacity30"

    Example:

    class="reflect ropacity33" class="reflect ropacity66" class="reflect ropacity100"

You can combine these two options. To create a 80% height 40% opacity reflection use:

class="reflect rheight80 ropacity40"

Scripting Reflections

If you want tons of flexibility, use scripted reflections. You can make your reflections respond to user actions (e.g. changing the reflection opacity when the image is hovered over) or add reflections to scripts such as Lightbox.

Reflection.add(image, options);

Adds or modifies a reflection to an image using Javascript. If the image is already reflected but the specified opacity or height has changed, the reflection will be changed accordingly.

image should be an image element.

options can contain a value for opacity or height. Both values should be between 0 and 1.

Reflection.add(document.getElementById("ohboy"), { height: 3/4, opacity: 2/3 });

Reflection.remove(image);

Removes the reflection from an image.

Reflection.remove(document.getElementById("orly"));
Reflection.defaultHeight = height;
Reflection.defaultOpacity = opacity;

Changes the default height and opacity of reflections. The default value for both settings is 0.5.

Known Issues

Attention!
  • Reflections of animated images only work correctly in Internet Explorer.
  • Reflections of scaled images will look stretched in Internet Explorer.

Improvements

If you've made any changes or bug fixes to reflection.js, feel free to publish and distribute them. If you contact me through my blog I can also include the changes in the main reflection.js download.

Supported Browsers

  • Internet Explorer 5.5+
  • Mozilla Firefox 1.5+
  • Opera 9+
  • Safari 2+

Changelog

Version 1.6

  • Don't create a <div> in browsers not supporting canvas but supporting JS
  • Fix gap between image and reflection in XHTML Strict

Version 1.5

  • Fix issue with reflection not appearing for wide images
  • Add scriptable reflections - Reflection.add(), Reflection.remove()
  • Make reflection of images with specified dimensions better
  • Fix Safari issue
  • Removed wholeimage class
  • Created Test Suite

Version 1.0

  • Add Internet Explorer support
  • Remove prototype.js dependency (filesize down from 32KB to 4KB)
  • Code cleanup

Version 0.4

  • Fix problem with floated images, borders, etc.
  • Removed unnecessary linebreak

Version 0.3

  • Fix for Safari in standards compliant mode

Version 0.2

  • Fix for Safari

Version 0.1

  • Initial Release

Credits

Original idea and inspiration for the script came from Romain Guy's Crystal CD Case. Sitharus made it all work in Safari. Andreas Linde helped make the script work better with CSS styles. Tralala at vBulletin.org did a great job of finding bugs with reflection in Safari and fixed them! Niels Leenheer provided a fix for an issue in Opera 8.5 where Reflection.js may move images around. "Withinreach" informed me about an issue with XHTML Strict. Thanks and Kudos!

A big thank you to everybody who has left their thoughts and comments. Your feedback has been invaluable.

cow.neondragon.net


Place your Advertisement here!


New DVDs
Product Image    Product Image    Product Image    Product Image    Product Image    Product Image    Product Image    Product Image    Product Image    Product Image    
 
Online Info
 
Register Here
Lost Password

 
Membership:
New Today: 0
New Yesterday: 0
Waiting User(s): 2
Total Members: 140
Latest User: adrienangel

Most Ever Online:
Guest(s): 78
Member(s): 0
Total: 78

Online Stats:
Guest(s): 13
Member(s): 0
Total: 13
 
IP Information
IP: 38.107.191.113
ISP: 191.113
 
Search Site
  
Website Google
 
Time & Date
 
Downloads Hot
01: MWL Map Pack 2
02: mektek Zone Update 1
03: MWL Map Pack 1
04: snap preview
05: BKV Map Pack
06: MWL Map Pack 3
07: WelcomePM
08: mektek Zone Update 1
09: Mercs CPU Voice Audi
10: Days to Christmas an
11: Film Strip Cats
12: Bot Names 1.1.exe
13: ZoneFix
14: shellmt.dll
15: InnerSphereSafeCast
16: ClanSafeCast Repair.
17: Alien Base
18: LostCity
19: MudDucks
20: CoyoteDen
 
Survey Random
Which Mechwarrior 4 game do you like best?

Mercs
BK
Veng



Results
Polls

Votes 15
Comments: 0
 
Forums Last Post
There isn't content right now for this block.
 


Angel One is a Mechwarrior Support Website.


Find the Angel One Mechwarrior 4 Server online in the New Zone by MekTek.net.


To play Mechwarrior to its fullness you got to play on the Angel One Server!
Pc-Nuke! Portal Systems ---[ Xtreme! v7.9.31eV1.5 ]--- All Rights Reserved 2007
Pc-Nuke! Portal Systems - All Rights Reserved 2003-06 Get our RSS NewsFeeds Now! Validated Robots © 2000-2006 by PHPNuke.org. All Rights Reserved. Website engine code is © copyright by PHP-Nuke. PHP-Nuke is a free software released under the GNU/GPL
Page Generation: 1.33 Seconds