E-mail List Archives
Re: ::after for doc types
From: Swift, Daniel P.
Date: Aug 3, 2016 9:00AM
- Next message: Swift, Daniel P.: "Re: Header levels"
- Previous message: Steve Faulkner: "Re: Header levels"
- Next message in Thread: John Foliot: "Re: ::after for doc types"
- Previous message in Thread: Joseph Sherman: "::after for doc types"
- View all messages in this Thread
You could use JS to check links on page load and append the icon to the link if the href ends in docx (for instance). I would think that would work okay.
Before:
<a href="something.docx">text</a>
After:
<a href="something.docx">text <img src="docIcon.png"/></a>
In jQuery, something like:
$(document).ready(function(){
$('a[href$="docx"]').each(function(){
$(this).append('text <img src="docIcon.png"/>');
});
});
My syntax might be a little off, but that would be the gist. Obviously include appropriate accessibility tags to go along with the image.
-Dan
- Next message: Swift, Daniel P.: "Re: Header levels"
- Previous message: Steve Faulkner: "Re: Header levels"
- Next message in Thread: John Foliot: "Re: ::after for doc types"
- Previous message in Thread: Joseph Sherman: "::after for doc types"
- View all messages in this Thread