Home

Keebler/Blog

« OS X on x86: So it begins…
Doom on Ipod »

New Content Highlighter

When it comes to webpages like blogs or news sites, most of the time, visitors are only interested in what is new.  Here’s a javascript I wrote that highlights new content via a subtle light-yellow background that fades in.  It is completely client-side, using cookies to store what the visitor has seen.

The script itself is very simple.  It just loops through all the elements on a page, looking for elements with an XHTML id matching a regular expression (in this case, ids starting with "post").  When it finds one, it checks whether a cookie for that id exists and if it doesn’t, it sets the cookie and highlights the element.

Happy highlighting :D

Release Files:

  • HighlightNewPosts.js
  • Fade API
  • Cookie API

Related Posts

  • Syntax Highlighter in Javascript
  • Google results now showing post counts and content insight
  • Flash of Unstyled Content
  • Scroll Div Content with Graphical Scrollbars Using DHTML
  • Dapper Content Extractor

This entry was posted on Friday, August 12th, 2005 at 8:59 pm and is filed under My Releases, Web Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Click here to cancel reply.

  • Blog Home

  • Tags

    90210 alessandra ambrosio animals asp.net audrina patridge battlestar galactica bikini bunny bush C# canada canada election ctv ctvglobemedia development Election Entertainment/Celebrity facebook Gordon Ramsay gorilla gossip girl hayden panettiere iphone last.fm liveblog liveblogging mesh08 muchmusic Music obama palin rachel bilson scribblelive shenae grimes subway telemarketers the hills the killers the office toronto ttc toronto tv us election video yeah yeah yeahs

    WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

  • Recent Posts

    • Trying to convince @idiotbante…
    • I wonder if the CTV “Save Loca…
    • Just finished dinner which I m…
    • I shouldn’t get as excited abo…
    • Stormtroopers’ 9/11 http://tin…
  • Categories

    • Election
    • Entertainment/Celebrity
    • Fake News
    • Featured
    • Funny
    • Keebler/Show
    • Music
    • My Releases
    • On-the-Road
    • RedDot
    • Reviews
    • Science/Technology
    • ScribbleLive
    • Security
    • Software
    • Torrent Live Stats
    • Tweets
    • Uncategorized
    • Web Development
  • Blogroll

    • Kitten-Monkey’s Cell
    • :: kattekylling ::
    • Adam Finley
    • blog-j
    • fuzzz.gaulin.ca
    • Idiot Banter
    • mad.greyarea.com
    • ob.blog
    • PollyPrissyPants
    • RedDot CMS Users Google Group
    • ScribbleLive Official Blog
  • My Sites

    • Flickr2Facebook
    • RedDot CMS
    • ScribbleLive
    • Where are my f(acebook)ing friends?
    • WhyYouShould