Set background based on SPAN contents
- by danit
I need to set a different background image dependant on the contents of a SPAN:
<div class="replies">
<span>2</span>
</div>
If SPAN = 1 background-image: url('reply.png') no-repeat;
If SPAN = 'anything other than 1' background-image: url('replies.png') no-repeat;
Can this be done in jQuery?