how to access tip DOM element from within plugins.tip({})? #9

AndrewFreemantle opened this Issue Feb 13, 2012 · 2 comments


None yet
2 participants

Please update the documentation to show how one can get at the DOM element that the tip is shown for.

For example:

<a class="target" href="#" data-id="77" >A pair of pliers</a>
<a class="target" href="#" data-id="81" >A blowtorch</a>

How would one get at the $(....).attr("data-id") when doing an Ajax call like so:

// Ajax content
  plugins: [
    filterContent: function(content, positionner) {
      content.html(' - some loading image - ');
      // If one does an ajax call here to get a string, how does one get at "data-id" ?
      content.load(myAjaxLoadedString, function() { positionner(); });

Many thanks


vicb commented Feb 14, 2012

See the examples, you can get the element from ts.element. If this solve your pb, I would appreciate if you can submit a PR for the doc.

@vicb vicb closed this Feb 14, 2012

Thanks, I'll try your suggestion and if I can get it working I'll update the docs :o)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment