views:

42

answers:

1

In http://www.merchantos.com/makebeta/tools/spyjax/ there is a script that reads browser history. Its not the javascript history object. It checks the color of links that changes if the link was visited or not.

Is there a script like this but in jquery?

+1  A: 

It doesn't read browser history, but rather relies on a "trick" that a visited link will have a different color (css :visited).

You can "do the same thing" by

$(document).ready(function(){
  $("#somed a").hide();
  $("#somed a:visited").show();
});

Then in your code:

<div id="somed">
 <a href="http://www.facebook.com"&gt;facebook&lt;/a&gt;
 <a href="http://twitter.com"&gt;twitter&lt;/a&gt;
 <!-- ... more ... -->
</div>
BryanH
This works in Firefox but not in IE8
Malcolm Frexner