Window.createPopup equivalent for otherthan IE
How to get window.createpopup like tooltip for browsers like Firefox, chrome and safari?
Can we use div?
In my scenario it should display as tooltip.
If we use how to change below code to other browsers?
开发者_如何学Python var oPopupBody = oPopup.document.body;
var sBody = "<span style='background-color:#ffffc4;border:2px solid black;height:100%;width:100%;'>";
if (sLabel) {
sBody += "<span style='font:10pt arial;font-weight:bold;padding-left:2px;text-align:center;width:100%;'>" + sLabel + "</span>";
}
sBody += "</span>";
oPopupBody.innerHTML = sBody;
oLink.title = '';
oPopup.show(oLink.offsetWidth, -10, iW, iH, oLink);
oLink.title = sLabel;
you could use jquery for this, something along these lines:
$(element).hover(
function(){
$(this).find(child-element).show();
},
function(){
$(this).find(child-element).hide();
}
);
Something like this - http://jsfiddle.net/ajthomascouk/AShzJ/
精彩评论