I used Jquery Bubblepopup plugin for display tool-tips.
BubblePopup is created on mousehover on a div, this div is created dynamically by Jquery’s append method. All Jquery functionalities are working fine but this is not working without alert.
$(document).ready(function () {
//alert($('#mapcontainer a.fixed').length);
window.setTimeout(function () {
$('#mapcontainer div.fixed').CreateBubblePopup({
position: 'top',
align: 'center',
divStyle: {
color: '#000000',
margin: '-20px 0px 0px 0px'
},
innerHtml: 'Add or change location',
innerHtmlStyle: {
color: '#FFFFFF',
'text-align': 'center'
},
themeName: 'all-grey',
themePath: 'images/jquerybubblepopup-theme'
});
}, 50);
});
- div, anchor, fixed class created by jquery append method
If you are using a very small quantity of delay, then omit the setTimeOut() method and put your function directly inside the ready() method.
And if you may want some time delay while executing. Either you can increase a bit more time so that the whole page will be loaded while executing your code.
The best and efficient manner is to use document.ready() method at the end of your webpage just above the body tag. Surely this technique will resolve your problem.