Trinity of Fantasy

EVERNA Exploring Worlds of Fantasy (English)
http://fireheart-vadis.blogspot.com/
Everna and FireHeart Saga Novels by Andry Chang, research notes and records about worlds of Fantasy/Epic Fiction in general

Fantasy Worlds Indonesia (Indonesian)
http://fantasindo.blogspot.com/
News and updates about Everna Saga - FireHeart Published Novels by Andry Chang in Indonesian Language
and reviews about Indonesian fantasy fiction writers, aspiring writers and creators in general

EVERNA Codex Evernium (English-Indonesian)
http://evernade.blogspot.com
EVERNA SAGA Wiki, Lore and Encyclopedia
Come forth, Paladins! Fulfill Your Destiny!

Explore Everna With Google

Google

dari Qureyoon nextprevlink

Simple Next-Prev Link
One thing that I've always wanted to put on my blog page, is some cool scrolling fx :P something like when i clicked the link then it goes scrolling smoothly :P Well after searching and experimenting, there are lots of javascripts out there to achieve this kind of FX, you can always find it using google ;)But my last choice was on moo.fx :) why do i choose moo.fx and what the heck is moo.fx ?? Well moo.fx is a super lightweight javascript effects library, it was only around 4-5kb ! Imagine those size ! While others provided the same effects, they can take up to more than 50kb even above 100kb ! For me size does matter, since in indonesia here, there's still plenty of 56k ers :PSo, i began to wrote the javascript in order to make a link to each post on the Main Page :)In order to make this thing goes smoothly, then you'll have to add the moo.fx to your page, i suggest that you download and host the javascript by yourself ;)Well, then on with the simple thing on how to make the Next-Prev Link, at the moment this idea came up, i think of it this way, 'Hm.. in order to link to each post, then i have to make some unique id' and that's it ;)So i create a
tag which contain some id, the id itself was simple, i use the id npl1, npl2, npl3, npl4, npl5 ... and so on :)So for each post there's a div tag like this :
.....(this is where i put the next prev link)......
Now, the next thing is that we have to make some javascript to do numbering id. In order to have it done, you'll have to add this code, just before the tag
This is the main class that i created for the Next-Prev Link ^^ well, the idea is simple, you just to hold the value for the
tag :)and then go find your and tag in your template, and then put this script, which will looked like this :

<$BlogDateHeaderDate$>

now this code is divided into 3 main code
It writes the
tag with the numbering, as for this the id will be npl1 npl2 npl3 npl4 npl5 and so on (umm..fyi npl is Next Prev Link :P)
Make the Next Prev Link inside the
so that when we clicked on it, it'll scroll to post related
Increment the number ! (This is the biggest thing ;)) We increment the number so that the next post will have a different id ;)Well that's it ;)Oh wait .. there another one :P In the very bottom one find the tag then you add this one script right after that tag:
That script is a little cheating :P the scripts will make the Next link to disappear from the last post ;)or you can change the script to this: [Update]

Comments

Popular Posts