Spinoff Links Updated Again

Charles Johnsonfollow me on twitter
Mon Jan 7, 2008 at 6:00 pm PST • Views: 180

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.

Advertisement

68 comments

^ back to top ^

Name:

Pass:

Register Forgot Your Password? Re-send Confirmation (To log in, cookies must be enabled in your browser!)

Turn off ads by subscribing!
For about 33 cents a day, our subscription option turns off all advertisements at LGF!
Read more...


► LGF Headlines

  • Loading...

► Tweeted Articles

  • Loading...

► Tweeted Pages

  • Loading...

► Top 10 Comments

  • Loading...

► Bottom Comments

  • Loading...

► Recent Comments

  • Loading...

► Tools/Info

► Tag Cloud

► Contact

You must have Javascript enabled to use the contact form.
Your email:

Subject:

Message:


Messages may be published in our weblog, unless you request otherwise.
Tech Note:
Using the Contact Form

More Partners

Compare Electricity Prices in your area. Texas Electricity is deregulated; you have the right to choose Texas Electric Rates from among many Texas Electric Companies.

Don't panic right away.

TwitterFacebook
LGF Pages
Recent Pages

researchok
'I Was Looking Forward to a Quiet Old Age': Instead, Etta Shiber, Helped Smuggle Stranded Allied Soldiers To Freedom
3 hours, 18 minutes ago
Views: 51 • Comments: 0
Tweets: 1 • Rating: 0

Daniel Ballard
Late Afternoon Light-Kalanchoe
10 hours, 59 minutes ago
Views: 98 • Comments: 0
Tweets: 0 • Rating: 4

MikeySDCA
Colin Powell Endorsed Same-Sex Marriage Once It Was Safe, More Evidence He's Hardly a Great Leader.
11 hours, 3 minutes ago
Views: 124 • Comments: 1
Tweets: 0 • Rating: 1

Eclectic Infidel
City College of San Francisco Budget Update
11 hours, 52 minutes ago
Views: 113 • Comments: 0
Tweets: 0 • Rating: 0

Michael McBacon
Kansas governor signs 'Shariah bill' to ban Islamic law
16 hours, 22 minutes ago
Views: 223 • Comments: 6
Tweets: 0 • Rating: 5

Aigle
National Geographic Traveler Veers Off Track
1 day, 16 hours ago
Views: 447 • Comments: 7
Tweets: 0 • Rating: -5

MichaelJ
Apple TV Slated to Debut in December?
1 day, 17 hours ago
Views: 221 • Comments: 0
Tweets: 0 • Rating: 1

Ascher
Israeli Who Saved Turk on Everest: You Never Abandon a Friend - Israel News, Ynetnews
1 day, 18 hours ago
Views: 296 • Comments: 1
Tweets: 0 • Rating: 3

Haywood Jabloeme
The Harrassment of Patterico & Its Roots in Left-Wing Activism
1 day, 18 hours ago
Views: 515 • Comments: 2
Tweets: 0 • Rating: 4

Curt
Brian Banks: (Video) Falsely accused of rape speaks out
1 day, 21 hours ago
Views: 269 • Comments: 2
Tweets: 0 • Rating: 5

 Frank says:

It's better to have something to remember than nothing to regret...