 at work today we were asked by a client to add a link to download adobe acrobat onto every page that had a pdf linked on it since the site was mostly static with some content coming from the content management system we were not interested in adding it to all of the static pages and changing the programming of the cms output pages my co worker and i decided that the best way to do it would be with javascript since the site was already using jquery our companys library of choice it turned out to be quite a simple task if you just want to get to the code take a look at the demo the idea we add the link to download adobe acrobat to the sites template we hide the link using css we use jquery to see if there are any links on the page linking to a pdf if there are we use jquery to show the link the execution ok simple enough just add the link to the source of the document p id= acrobatdownload a href= http www adobe com products acrobat readstep2 html download adobe acrobat to view the pdfs on this page a p then hide it with css acrobatdownload display none the jquery first we want to check and see if any of the links on the page end with pdf then if there are any we fade in the link $ document ready function if $ a href$= pdf length 0 $ acrobatdownload fadein slow i have created a demo page with a pdf link on it to see this in action conclusion i cant even imagine how much time and hassle we saved ourselves by doing this with javascript plus it could provide useful to someone who doesnt have acrobat although i cant imagine that there are many the concept is actually quite simple and my mind is grinding away trying to think of other ways to use jquery to do things like this can you all think of anything 