new to Jquery, not rly understanding how to do arrays with it yet and I was wondering how to make a div into a link depending on its class, as well as make it link to different things depending on its class (example below).
css –
.a (link to domain.com/a)
.b (link to domain.com/b)
.c (link to domain.com/c)
HTML
<div class="a">
<div>
This little snippet will do it:
Demo on jsfiddle – http://jsfiddle.net/FloydPink/zkuFA/
What this does is uses the jQuery wrap function to add an
anchortag dynamically using theclassnameon thedivfor itshrefattribute