0

I need to write a selector in jQuery for finding all links to various media file. So far, I was able to find only selectors to specific files, for example, $('a[href$=".pdf"]').

I need to locate only links that will to any media file, such as, pdf, doc, jpg, etc. For example, this link should not be matched by the required selector <a href="../pdfs/christmas/"> as it is just just a web address and not a resource. I am looking for a universal solution that would work without predefined set of file extensions that we need to match.

Is it possible? Thanks.

0 Answers0