Reflection.js is a cool script to add reflection to your images. See it in action [here].
Generally, to enable reflection one has to add class=reflect to each of the img tags in your post. Now, we can't go back and change this on all the posts that we're been putting up for years, can we? Moreover, we wouldn't want this class attribute to be part of the feed that we're syndicating - how will the poor RSS readers know what this class means?
To obviate this issue, here is a enableReflect.js implementation that adds the class attribute at the time of page load and triggers reflection after that. Thus, the reflection feature becomes a part of the website meta-data and is not tightly coupled with the site posts themselves. Additionally, if you want to remove this feature or want to change to something new that comes up in the future, all you'll need to do is to change the blog template!
To have reflection on all your blogger posts, have these two lines before </head> tag in your blogger template.
If u like it, please send me a note. If you don't, then let me know why? (ya, really!)
Cheers, Div
Updates: -removed alt text that was previously added. -Updated the string above: the tag values are enclosed in single quotes (not backquotes). Each line ends with a />. This makes it XML compliant for blogger. -Hosted the javascript file in my Google pages account. The reflection 1.9 code is embedded in the blogger code.
I tried pasting those 2 lines immediately before the </head> tag and got this error message:
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: Open quote is expected for attribute "{1}" associated with an element type "src".
Great effect i was looking for a long time for it how to do it, but i`m sorry but i added the lines and it is not working.. Let me know if you update it.. Thx Dadexter http://mixdiggerz.blogspot.com/
I saw the html source of your website. You have placed the two script lines correctly before the closing head tag. However, just pasting these files will not work. You'll first need to:
1. Download reflection.js from Cow's site 2. Download enablereflect.js from my link (provided above) 3. save these two files on a server (like googlepages) 4. Put the url of these two js files in the script tag.
It should work then.
I'm looking for a way to host my js file somewhere so that everyone can just hotlink to it. I'll update this post when I'm done.
I tried pasting those 2 lines immediately before the </head> tag and got this error message:
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Open quote is expected for attribute "{1}" associated with an element type "src".