I have one content page where there are links to different documents like .doc, .docx, .ppt .pptx, .txt.
I want to apply/add class dynamically not manual. like as per the link content.
<h3><a href="document.pdf" class="pdf-file">Document.pdf</a></h3>
.pdf-file {
background:url(../images/pdf-file.png) right center no-repeat; padding-right:18px;
}
This is manual class I applied.
jQuery solution will be prefered.
If you like my Question fav it. :) thank