Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Balloon contents changed but on first hover, old contents persist. #33

Closed
markskayff opened this issue Apr 17, 2017 · 2 comments
Closed

Comments

@markskayff
Copy link

Hey, congrats for your plugin. I have an issue though.
How do you update the data within a ballon dynacamically? A method like reset balloon contents, etc...
Moreover, when I change the balloon contents on the fly doing a new $().balloon() action, then on first mouse hover over the element, the balloon still has the old contents. Do you think you can implement a solution for this?

@urin
Copy link
Owner

urin commented Apr 23, 2017

You can pass a function to contents as an option.
Example:

$('selector').balloon({
  contents: function() {
    return Math.random();
  }
});

It is better to add description about this option.

@markskayff
Copy link
Author

Hey, using a function with a return statement worked. Not sure why, but thanks. Maybe this should be documented.

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

No branches or pull requests

2 participants