zouxiaojia
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>弹出窗测试</title>
    <link href="js/library/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" />
    <script src="js/library/jquery-2.2.3.min.js"></script>
    <script src="js/library/bootstrap-3.3.5/js/bootstrap.min.js"></script>
    <script>
        window.onload = function () {
            var otherCityPopover = $("#otherCity_a").popover({ html: true, trigger: \'focus\', placement: "bottom", delay: 2000, content: function () { return document.getElementById(\'otherCity_div\').innerHTML; } });
            otherCityPopover.on("mouseover", function () {
                otherCityPopover.popover(\'show\');
                $(".popover").one("mouseleave", function () { otherCityPopover.popover(\'hide\'); });
                $(document.body).one("click", function () { otherCityPopover.popover(\'hide\'); });
            });
        }
    </script>
</head>
<body>
    <label id="otherCity_a" class="btn btn-default" style="width:59px;">
        其他
    </label>
    <div id="otherCity_div" style="display:none">
        <div style="width:200px; display:inline-block;">
内容 </div> </div> </body> </html>

 

分类:

技术点:

相关文章:

  • 2022-02-10
  • 2021-10-19
  • 2021-10-19
  • 2021-11-11
  • 2021-12-18
  • 2021-09-07
  • 2021-08-26
  • 2021-10-19
猜你喜欢
  • 2021-10-19
  • 2021-10-19
  • 2021-10-19
  • 2021-10-19
  • 2021-10-19
  • 2022-01-13
  • 2021-10-17
相关资源
相似解决方案