Jquery Popover - 隐藏

时间:2013-11-06 09:48:45

标签: jquery popover

我有奇怪的问题。我在Jquery做了popover。当它出现一些链接时。当我关闭它时,我无法点击此链接。就像这个popover是隐藏的,我们看不到它,但它仍然存在,它阻止了这个链接的“方式”......

关闭popover的脚本:

    $(document).on("click",".close", function(){
        $("#add-users-from-emails-btn").popover('hide');
    });

酥料饼:

    $("#add-users-from-emails-btn").popover({
        placement: "bottom",
        title: '<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> {{'user.index.enter_users_emails_each_rows'|trans|raw}}',
        html: true,
        content: $("#add-users-from-emails-popover")
    }).on('show.bs.popover', function(){
        $("#add-users-from-emails-popover").removeClass("hidden");
    }).on('shown.bs.popover', function(){
        $("#add-users-from-emails-popover textarea").focus();
    });

形式:

<form id="add-users-from-emails-popover" class="hidden clearfix" style="width: 300px;" method="post" action="{{path('adm_user_addusersfromemails')}}">
    <select name="business" class="form-control">
        <option class="empty" value>{{'empty_value'|trans({},'app')}}</option>
        {% for b in business %}
            <option value="{{b.id}}">{{b.businessName}}</option>
        {% endfor %}
    </select>
    <textarea name="emails" style="margin-top: 10px" rows="5" class="form-control" style="max-width: 300px;"></textarea>
    <button type="submit" style="margin-top: 10px" class="btn btn-default btn-xs pull-right" id="save-users-from-emails-btn">{{ 'user.index.add_users'|trans }}</button>
</form>

我做错了什么? ; - )

问题已解决 关闭popover的正确脚本:

    $(document).on("click",".close", function(){
        $("#add-users-from-emails-btn").click();
    });

0 个答案:

没有答案