Issue with showBalloon()/hideBalloon when using URL content
ixiom opened this issue · 5 comments
Hi,
I'm trying to use the showBalloon() and hideBalloon() methods with the URL option for the content. When I click to show the balloon, it works fine. However, when I go back to click to close the balloon, I get the following error:
Uncaught TypeError: $(...).hideBalloon is not a function
I tried it without using the URL option, and it works fine. Thanks!
Could you provide sample code?
Hi Urin,
Thanks for the quick reply. Here is the code that I'm using:
<script> $(function() { var shown = false; $("#radioStatusDiv").on("click", function() { shown ? $(this).hideBalloon() : $(this).showBalloon({ position: "bottom", contents: 'Loading...', url: 'remSWDL.html', css: { border: 'solid 4px #5baec0', padding: '10px', fontSize: '150%', fontWeight: 'bold', lineHeight: '3', backgroundColor: '#666', color: '#fff', width: '90%', height: '60%' }, //url: 'remSWDL.html', showDuration: "slow", showAnimation: function(d, c) { this.slideDown(d, c); }, hideDuration: "slow", hideAnimation: function(d, c) { this.slideUp(d, c); } }); shown = !shown; }).hideBalloon(); }); </script>This doesn't work, but when I remove the url line above, it works fine. Thank you for your time.
Sincerely,
Hideo
On Aug 04, 2015, at 08:42 PM, urin notifications@github.com wrote:
Could you provide sample code?
—
Reply to this email directly or view it on GitHub.
Please remove the last .hideBalloon()
because it is not shown at that time.
After removing the last .hideballoon()
, I still get the error Uncaught TypeError: $(...).hideBalloon is not a function
. It does work fine when I remove the URL link. Thanks.
It is not reproduced using my local server. I think it is difficult to solve it without more detail information.
The error is not raised in the methods which jquery.balloon.js
provides.
The error means that the object $()
does not have the function .hideBalloon()
at that time.