Q:

rel and href match

http://jsfiddle.net/aprWP/
<a href="#numtag-1">One</a>
<a href="#numtag-2">Two</a>
<a href="#numtag-3">Three</a>

<div class="numtag-1">One</div>
<div class="numtag-2">Two</div>
<div class="numtag-3">Three</div>

.. on hover  the appropriate div should toggle class 'active'. 
Tried a lot of things but can't get it to work.
Thanks

A:

Using a combination of hover event and toggleClass:
$('a').hover(function() {
    $('div.' + $(this).attr('href').substring(1)).toggleClass('active');
});

http://jsfiddle.net/aprWP/7/
Changed to use substring as I think that's a better way of doing it.

