外部链接需要激活弹出窗口

时间:2019-01-29 08:05:44

标签: jquery wordpress popup

我的网站1需要导航到网站2,每当有人从网站1导航到网站2时,我的弹出窗口都需要自动打开。

1 个答案:

答案 0 :(得分:0)

将此代码添加到website2 header.php顶部

  <nav class="navbar navbar-expand-md">
            <ul class="navbar-nav">
                <li class="nav-item mega-dropdown-menu">
                    <a class="nav-link" href="#" id="dropdown01"
                       data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Test</a>
                    <div class="dropdown-menu" aria-labelledby="dropdown01">
                        <nav class="navbar">
                            <ul class="navbar-nav">
                                <li class="nav-item">
                                    <a class="nav-link" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">Accordion</a>
                                    <div id="collapseExample" class="collapse">
                                        <ul class="navbar-nav">
                                            <li class="nav-link">
                                                <a class="nav-link" href="#">
                                                    Accordion Link 1
                                                </a>
                                            </li>
                                            <li class="nav-link">
                                                <a class="nav-link" href="#">
                                                    Accordion Link 2
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </li>
                            </ul>
                        </nav>
                    </div>
                </li>
            </ul>
        </nav>