简体   繁体   中英

angularjs, tooltipster - mouseenter issues

I'm using angularjs with tooltipster ( http://iamceege.github.io/tooltipster/ ); I want to make a page where if you hover on text, an image is displayed (googleapis.com http request). However, there are a couple of issues:

  • When I hover over an text for the first time, only like 1/4 of image gets displayed; on the second time, the complete image is visible.
  • If I hover REALLY fast, images get "burnt" to screen; as it appears, I call "hide" before the element is created (ie web service sends the response to my code).

I've provided an example, which can be found here: http://jsbin.com/dubome/1/edit

Any kind of help is much appreciated!

Your element.tooltipster('hide'); gets called before element.tooltipster('show'); One possible solution is to check if showed the tooltipster.

Check my solution at http://jsbin.com/dofakotema/3/edit

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM