<a href="some-visited-url"> <span class="test"></span> </a>
Also, this will be very awkward when the style you see with your eyes is not the style that is given to JavaScript.
a:visited .test { /* sneaky style */ }
a .test { color: red; } a:visited .test { color: green; }
$('a .test').each(function() { if ( $(this).css('color') == 'green' ) { console.log( $(this).parent().attr('href') ); } });
a:visited + .sneakydiv { /* ... */ }
Also, this will be very awkward when the style you see with your eyes is not the style that is given to JavaScript.