Take <span> class and put in <a> attribute jquery
- by Toktik
Hello,
I have html like this.
<span class="gallery-open-item year-icon-Yes 2010">
<a href="/year/none">
</a>
</span>
I need to check by jquery if span.gallery-open-item have year-icon-Yes class take next(for this example is 2010) class and place it in a href attribute like this
All this I need in jQuery or JavaScript.
I have done some experiments but I can't take 2010 to normal javascript variable.
Any ideas?
Sorry for my english.