Thanks. How about if I want to make it dynamic ? Say, I have several
links on the page with different extensions
(Ex: .doc, .docx, .ppt, .pptx, .pdf, .mpg). Can I accomplish the above
with one statement rather than hard coding what text to append for
each extension ?

On May 14, 12:23 pm, brian <bally.z...@gmail.com> wrote:
> $("a[href$='.pdf']").after(' (pdf)');
>
>
>
> On Thu, May 14, 2009 at 11:55 AM, vmrao <maheshpav...@gmail.com> wrote:
>
> > I would like to display file extension along with the file links on a
> > web page.
>
> > For example, I would like to append (pdf) next to any pdf links.
>
> > The following code works to some extent but not as I intended.
> > $("a[href$='.pdf']").append(" (" + 'pdf' + ") ");
>
> > If I use the above code, (pdf) is also underlined being part of the
> > link. I want (pdf) next to the link and not as part of the link.- Hide 
> > quoted text -
>
> - Show quoted text -

Reply via email to