开发者

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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜