Yes, it works, although now on per link granularity. But since I really want to track all pdf downloads on my current page, that's enough.

Thanks a lot, jmu.


On 11/05/2010 07:45 AM, jmu wrote:
Could not resist looking at the documentation :)
http://api.jquery.com/attribute-ends-with-selector/

So, something like:

$('a[href$=".pdf"]').click(function (event) { alert('clicked!'; )});

On Nov 5, 4:38 pm, jmu<juha.p.musto...@gmail.com>  wrote:
Hi,

One option is to write own HTML builder (by extending the default) and
overriding the anchor generation: if the link target ends with ".pdf"
then put a suitable identifier to it.
Then again, I'm sure you can check the link prefix with the jQuery as
well, and use that information to put custom event handler to those
links?

-Juha

The raw html directive seems be able to add a customized html but I
can not make it inline.
Another possible way is to use jquery, but the generated<a>  doesn't
have an identifiable css class name.
Does anybody here have good suggestions?
Thanks.

--
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to