instagram rss arrow-down

$('a[href]').each(function() {
   if((C = $(this).attr('href').match(https://cdn.css-tricks.com/[.](doc|xls|pdf)$/))) {
       $(this).addClass(C[1]);
   }
});

This will look through every a element on the page. If the href attribute of it has a .doc, .xls, or .pdf in it, it will apply the appropriate class name to it (e.g. class="doc")

Source link

Support New Articles with a Sweet Tee

Leave a Reply
Your email address will not be published. Required fields are marked *

*

*