Return to Snippet

Revision: 52795
at November 1, 2011 15:09 by jackkeller


Initial Code
$('a[href]').each(function() {
   if((C = $(this).attr('href').match(/[.](doc|xls|pdf)$/))) {
       $(this).addClass(C[1]);
   }
});

Initial URL


Initial Description


Initial Title
Automatically Discover Document Links And Apply Class

Initial Tags
jquery

Initial Language
JavaScript