Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Multiple Tipped instances from the same target element

Is it possible to have multiple Tipped instances show for the same target element?

Here's my use case:
I've got an element which is just an icon. When you hover over that icon some text should be displayed, but when I click on that element I want to hide the text and show a different instance (a long interactive list).

If I create the second instance programmatically and just create the first instance in markup it works (OK-ish) apart from the fact that I can't apply different skins to the different instances - which itself is the problem.

Comments

  • edited April 2016

    Thanks, this was a bug, should be fixed in 4.5.6.

    You should now be able to do something like this:

    var a = Tipped.create('#element', 'text', {
      skin: 'light',
      behavior: 'hide'
    });
    
    var b = Tipped.create('#element', 'list', {
      skin: 'dark',
      showOn: 'click',
      position: 'bottom',
      onShow: function() {
          a.hide();
      }
    });
    
  • Hi Nick, thanks for the info can you give me an idea of how to fix it locally for the moment. It is oddly enough causing a major issue on a component I am developing. Without the fix I need to perform a tonne of DOM manipulation for a fairly discrete component.

  • The Collection object got a rewrite to contain tooltips instead of a reference to one or more elements. Some API calls and methods on the internal Tooltips object had to be adjusted to work with that.

Sign In or Register to comment.