Saw the site title? saw the post title above? expected to see in this content too? Well That’s also possible.
Seems good? want it in your site? Adding it, is very simple.
Using WordPress for your site? There’s a plugin for wordpress sites. check this link
You’re reading this line, that is, you are not using wordpress. So, what to do?
Just add following line in your html/php page:
<script src="http://hasnath.net/extra/fancy.php"></script>
That’s it!
you can also add some extra options, to animate only for one time, i.e one time per page loading, add loop=false
parameter.
So the code becomes:
to specify the speed yourself, add speed=your_speed
parameter, like
Where to place this code:
Usually the most appropriate place for placing javascript is before the closing
tag. i.e just before tag. However, this script is ignorable in size (only around 2KB). So it doesn’t really matter. you can place it anywhere in or tag.Advanced Options:
you can make the script more useful. you can apply it for almost any content on you page. there are some functions:
fancyClass(class_name, position, loop, speed);
fancyTag(tag_name, position, loop, speed);
fancyIt(id_name, loop, speed);
Usages
fancyClass('my_class', 0, 1, 150); // the first 'my_class' goes in action
fancyTag('a', 3, 0, 150); // for animating third 'a' (link) tag
fancyIt('my_id_name', 0, 130); // 'my_id_name' css id runs at 130 miliseconds speed
Hope the examples make senses. you need to use this inside tag, e.g.
finally, if you want to use these functions make sure to add the above line after the script inclusion line (i.e
[fancy loop=true]
Leave a Reply