I need a link in the tooltip text for my d3 scatterplot which invokes javascript
I've read this: http://bl.ocks.org/d3noob/c37cb8e630aaef7df30d.
And I removed 'pointer-events: none;'
from the css of my tooltip as required.
- I've tried setting the
href
in the link to both'#'
and'javascript:void(0)'
. - I've tried using a jquery click handler
($('a.my-class').click(function(){...}))
.
Nothing has worked. When I click the link the javascript is not invoked. If I set the href
to a URL and click the link, however, the browser does go to the URL I specified.
So why doesn't it work with javascript?