Setting visited on link in jQuery -
i catch click event on hyperlinks , instead open jquery ui dialog using href. return false avoid browser doing too...
$('a.previewable').click(function(){ $('#dialog').html('<img src="'+$(this).attr('href')+'">'); $('#dialog').dialog({ title: 'preview', width: 350, modal: true }); return false; });
it works great link color doesn't change visited when click on it. how can tell browser link has indeed been visited?
thanks!
well, since did return false
, hasn't been visited. best style it.
$(this).addclass('visited');
css
.visited { color: purple; }
Comments
Post a Comment