Giter VIP home page Giter VIP logo

html5tooltipsjs's People

Contributors

arendjr avatar brunobatista avatar dehenne avatar dignifiedquire avatar javamonn avatar kahmali avatar nomiad avatar peripheral1994 avatar superelement avatar ytiurin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

html5tooltipsjs's Issues

HTML5TooltipUIComponent.show() Not Working

So, this works:

html5tooltips({
	animateFunction: "scale",
	color: "navy",
	contentText: "Select Credit or Debit",
	stickTo: "top",
	targetSelector: "#balance",
	persistent: true,
	hideDelay: 15000
});

But my goal is to display the tooltip when a user submits a form, so I followed your doc:

var tooltip = new HTML5TooltipUIComponent;
var target = document.getElementById( 'balance' );
console.log( target );

tooltip.set({
	animateFunction: "scale",
	color: "navy",
	contentText: "Select Credit or Debit",
	stickTo: "top"
});
target.addEventListener('mouseenter',function(){
	console.log( 'mouseenter' );
	console.log( tooltip );
	tooltip.show();
});
target.addEventListener('mouseleave',function(){
	console.log( 'mouseleave' );
	tooltip.hide();
});
tooltip.mount();

Consoling target shows the element I want, and consoling tooltip shows the tooltip object with all of the methods I'd expect to see. No console errors, just doesn't show.

z-index not defined

Hi,

Very nice lib.
There is a problem when you add a tooltip near another div with a big z-index, my tooltip text is partialy hidden :(

In your library .js file, when you create the div used for the tooltip, you should add a z-index value else the tooltip could be hidden :

tooltipHTML='\
<div class="html5tooltip" style="box-sizing:border-box;position:fixed;z-index: 1000001;">\.....

I have add the z-index: 1000001 value and now the tooltip is always on top.

You should add this in your lib.

Should i pull a request ?

tModel grows exponentially

In this function:

var html5tooltipsGlobal=function(userTModels, userOptions)
{
  if (userTModels.length)
    // merge arrays
    Array.prototype.push.apply(safeTModels, userTModels);

  else if (typeof userTModels === "object")
    safeTModels.push(userTModels);

  options = userOptions ? extend({}, userOptions) : options;

  Array.prototype.push.apply(tModels,safeTModels);
  untieTooltips&&untieTooltips();
  untieTooltips=tieTooltips();
};

The variable tModels grows exponentially every time you call html5tooltips({...});. Because safeTModels contains all your toolTips (+1 every call) and you add it every time to tModels. I create round about 20 tooltips but tModel contains over 400 entries. If I found a solution I post it later hier.

Have a nice day :)

Allow programmatic access to tooltips

Currently, there is no way to:

  • programmatically make a tooltip appear (except by hacking: html5tooltips({...}); $input.blur(); $input.focus();)
  • programmatically remove a tooltip (e.g. var tt = html5tooltips({...}); tt.destroy();)

apply to cached Dom object instead of selector

I generate the stuff in a template. It looks like:

I want to be able to pass html5tooltip() a dom object instead of a selector.

i.e.,

const selectedDomObject a=$('#something');

//do some stuff to generate content text from the tooltip string

html5tooltip(
targetSelector:selectedDomObject,
//etc
);

I was really surprised that this doesn't already work. Any advice?

More placement options

Hi,

Great plugin! Is it possible to add more positioning options for the tooltip?

Currently we have top, bottom, left and right. I would like to be able to combine them. For example bottom-left.

Perhaps this could be easily fixed with overwriting some CSS?

I would be happy to help, however, I am not able to keep the tooltip longer in my DOM to be able to play around with css...

tooltip unresponsive to screen size

Hi,

When I tried to change the width of the web page, tooltips did not move over unlike everything else that did. Is there a way that you can make tooltips responsive to the change of the screen size? My suggestion would be to just turn off the tooltip whenever the mouse is not hovering on one of the sections.

Before any change:
demo1

After making the window width smaller:
demo2

Otherwise, tooltips is really nice! Keep up the good work!

Release of version 1.7.3?

After merging @dehenne pull request (d13aca0), is it possible to create/release a version 1.7.3?
We need that fix in our project and would like to prevent the hassle of creating our own fork.

Thanks in advance :)

Slidein + fade => is that possible ?

Hi,

Is there a way to add a fade in/ou when the effect is set to "SLIDEIN" ?
Thank you for your help.

UPDATE : in fact i think the javascript destroy the tooltips once the mouse is leaving, so the tooltips is hidden without a fade effect. Is there a way to change this ? Thank you.

Keep up the good work.

Make tooltip remain when hovered over

Is it possible to have tooltip remain active if you hover over the tooltip itself? It appears the default setup is to have it disappear when you are not hovering over the target element, but there are a number of use cases for making the tooltip persist if you hover over it (an HTML button with a click action as contents, for example).

Global config

First of all, great lib!

Would be really nice to be able to set global settings for the available attributes so that you dont have to set e.g. ´data-tooltip-setto="right"` on all individual elements.

Extract contentText from an attribute of the target

I construct the stuff in a template. I stash the tools tips like this:

When I found that html5tooltip() doesn't allow you to simple specify an attribute for the content, I assumed I would have to iterate over the list of elements, extract the text and make the call.

The function is so nice that I actually can't believe that this is the case. Any advice?

Expose "moveTooltip" to public API

Looks like the only way to trigger "moveTooltip" currently is to fake the "scroll" event, but that's hacky. It would be useful in the public API for cases like mine, where numerous factors can change the DOM layout.

Manual maxWidth

maxWidth needs a number like 180 not a String ("180px"), can u update your manual?

Tooltips do not work on iOS 9

Tooltips are not displayed when tapping on the trigger. Tested on:

  • iPhone 6s, iOS 9.3.4, Safari
  • iPhone 6, iOS 9.3.2, Safari

Unfortunately I am unable to debug the issue because I don't have a device with OSX. Could you please investigate this issue?

Thanks!

ReferenceError: moveTooltip is not defined

How to repeat:

const tooltip = new HTML5TooltipUIComponent();
tooltip.set({ 'target': $0 });
tooltip.mount();
tooltip.destroy();

problem in:

  // UI COMPONENT CONSTRUCTOR
  function Component(publicInterface,HTML)
  {

   // ...

    // COMPONENT INTERFACE
    component.destroy=function()
    {
      if(typeof window!=='undefined'){
        window.removeEventListener("resize", moveTooltip);
        window.removeEventListener("scroll", moveTooltip);
      }

      component.unmount();
    };

   // ...

  }

function moveTooltip declared in internal scope of

  // TOOLTIP UI COMPONENT
  function HTML5TooltipUIComponent()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.