Jquery 使用ajax加载面板时不工作鼠标事件

Jquery 使用ajax加载面板时不工作鼠标事件,jquery,Jquery,当mouseenter事件触发时,我在div中添加了一个按钮,但当使用$.ajax()添加create项并使用load函数刷新面板时,mouseenter事件不起作用 <script> $(function Bindmouseenter() { $('.divitemList').mouseenter(function () { $(this).append('<input onclick="DeletePriority($(this).parent())" valu

当mouseenter事件触发时,我在div中添加了一个按钮,但当使用$.ajax()添加create项并使用load函数刷新面板时,mouseenter事件不起作用

<script>
 $(function Bindmouseenter() {
    $('.divitemList').mouseenter(function () { $(this).append('<input onclick="DeletePriority($(this).parent())" value="حذف" type="button" class="btn-danger btnDeletePriority" />') })
    $('.divitemList').mouseleave(function () { $('.btnDeletePriority').remove() });
});

$(函数Bindmouseenter(){
$('.divitemList').mouseenter(函数(){$(this.append('')})
$('.divitemList').mouseleave(函数(){$('.btnDeletePriority').remove()});
});

并在项目添加到面板时调用下面的脚本以刷新面板项目

<script>
    function GoToPriorityPnl() {
        $('#PriorityPnl').load('GoToPriority')
        $('ul').empty();
    }
</script>

函数GoToPriorityPnl(){
$('PriorityPnl').load('GoToPriority'))
$('ul').empty();
}
使用
.on(事件、选择器、处理程序)