Spinoff Links Updated Again
The spinoff links feature has some enhancements tonight:
* When you rate a link, the list of links is re-sorted to show you the new position of the link you just rated.
* Starting earlier this afternoon, all links display their creation date.
* The top rated links section uses a session variable to keep track of the last category you were viewing, so whenever you open the top rated links area it opens to that category, even as you move around to different pages at LGF.
As I mentioned earlier, the top rated links will begin to get much more active in the next 12-24 hours, as the creation dates catch up to the current 48-hour interval.
And finally, non-techie readers can tune out because I’m about to go on a geek rave about the jQuery Javascript Library again, with an example showing why I recommend this library so highly to Javascript programmers.
Thanks to jQuery, the following single statement does an amazing amount of work in our spinoff links rating code. In order, it:
* hides the rating number…
* injects the new number into the DOM…
* fades the number in, oh so slowly (this operation alone is worth dozens of lines of code)…
* when the fade is finished, uses a callback function to do an insanely elegant traversal of the DOM (parents and children and siblings, oh my!), to find the related entry number of the spinoff links and call the function that reloads them.
You don’t even want to know how much non-jQuery Javascript would be required to accomplish all of this.
Crazy, man.



