First, thanks for this plugin - it is nice and lightweight, with decent features.
I have a client who wanted a popup to appear only when the trigger element is clicked, in toggle fashion, and ran into a few problems using this plug that way and found some solutions, but I had to modify the v1.1.3 code to make it all work. Here's what happend:
In the test I made, when a config of event:{def:'click,click'} was used the element would show and then quickly hide the element upon click. Changing it to event:{def:'click,'} worked; without the trailing comma, an error was thrown. This seems contrary behavior to the documentation.
When I tried it on my client's dev site, this behavior broke. Everytime I mouseovered the trigger elements, tooltip would show the popup, which was not the click only behavior I assigned it. This took me a long time to track it down, but I finally found line 362 of tooltip v1.1.3 code and disabled this it and everything worked again; automatic Lazy loading with over 20 elements was causing the problem. I don't know why this line is in here, because the plugin works fine with it disabled, even with default settings. It is essentially forcing a tip.show on all mouseover events when lazy load is turned on, which then overrides the already bound trigger show events.
The other problem I ran into is for some strange reason all of the events on the tip element were being flagged PreventDefault, preventing either of these events from being triggered, despite binding. This is only happening on my client's codebase and is more than confusing. I really don't have any experience with PreventDefault event tagging or why it would be happening only on my client's server and not in my tests or the samples presented online. In the end my solution was to comment line 218 and line 262 of tooltip v1.1.3. Perhaps this could be a conf disabled 'feature' for people using strange systems? If anyone has any ideas how PreventDefault could be set on an Event in the global space - I can't imagine! causing this problem?! I would love to hear it because I am clueless.
PS: I wish the tooltip.dynamic plugin worked with Lazy loading and when CSS height is undefined.
Jt
I have a client who wanted a popup to appear only when the trigger element is clicked, in toggle fashion, and ran into a few problems using this plug that way and found some solutions, but I had to modify the v1.1.3 code to make it all work. Here's what happend:
In the test I made, when a config of event:{def:'click,click'} was used the element would show and then quickly hide the element upon click. Changing it to event:{def:'click,'} worked; without the trailing comma, an error was thrown. This seems contrary behavior to the documentation.
When I tried it on my client's dev site, this behavior broke. Everytime I mouseovered the trigger elements, tooltip would show the popup, which was not the click only behavior I assigned it. This took me a long time to track it down, but I finally found line 362 of tooltip v1.1.3 code and disabled this it and everything worked again; automatic Lazy loading with over 20 elements was causing the problem. I don't know why this line is in here, because the plugin works fine with it disabled, even with default settings. It is essentially forcing a tip.show on all mouseover events when lazy load is turned on, which then overrides the already bound trigger show events.
The other problem I ran into is for some strange reason all of the events on the tip element were being flagged PreventDefault, preventing either of these events from being triggered, despite binding. This is only happening on my client's codebase and is more than confusing. I really don't have any experience with PreventDefault event tagging or why it would be happening only on my client's server and not in my tests or the samples presented online. In the end my solution was to comment line 218 and line 262 of tooltip v1.1.3. Perhaps this could be a conf disabled 'feature' for people using strange systems? If anyone has any ideas how PreventDefault could be set on an Event in the global space - I can't imagine! causing this problem?! I would love to hear it because I am clueless.
PS: I wish the tooltip.dynamic plugin worked with Lazy loading and when CSS height is undefined.
Jt
