Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在分页JSON中切换页面后,在jquery中重置一个触发器_Jquery - Fatal编程技术网

在分页JSON中切换页面后,在jquery中重置一个触发器

在分页JSON中切换页面后,在jquery中重置一个触发器,jquery,Jquery,我有一个带分页的引导表,我使用一个mouseover事件,当用户将鼠标移动到表上以获得一个可编辑的插件时,该事件由.one触发 当我第一次加载表时,mouseover事件正常工作。我一进入下一页,mouseover事件就不再工作,因为它已经从第一页触发。是否可以在切换页面后重置。一个触发器,使其每页只触发一次,而不是整个页面触发一次 JS表 var $table = $('#table-javascript').bootstrapTable({ method: 'get', ur

我有一个带分页的引导表,我使用一个
mouseover
事件,当用户将鼠标移动到表上以获得一个可编辑的插件时,该事件由
.one
触发

当我第一次加载表时,
mouseover
事件正常工作。我一进入下一页,
mouseover
事件就不再工作,因为它已经从第一页触发。是否可以在切换页面后重置
。一个
触发器,使其每页只触发一次,而不是整个页面触发一次

JS表

var $table = $('#table-javascript').bootstrapTable({
    method: 'get',
    url: 'bootstrap_database.php',
    height: 2500,
    cache: false,
    striped: true,
    pagination: true,
    search: true,
    pageSize: 200,
    pageList: [200, 400, 1000, 2000],
    minimumCountColumns: 2,
    clickToSelect: true,
    columns: [{
        field: 'ID',
        title: 'ID',
        align: 'center',
        visible: false
    },{
        field: 'backlink',
        title: 'Backlink',
        align: 'left',
        width: '20'
    },{
        field: 'indexed',
        title: 'PI',
        align: 'center',
        width: '20',
    },{
        field: 'dindexed',
        title: 'DI',
        align: 'center',
        width: '20',
    },{
        field: 'email',
        title: 'Email',
        align: 'center',
        width: '20'
    },{
        field: 'social',
        title: 'Social+',
        align: 'center',
        width: '20'
    },{
        field: 'whois',
        title: 'Whois+',
        align: 'center',
        width: '20'
    },{
        field: 'notes',
        title: 'Notes',
        align: 'center',
        width: '20'
    },{
        field: 'removed',
        title: '<i class="fa fa-chain"></i> Removed',
        align: 'center',
        width: '20'
    },{
        field: 'import_label',
        title: 'Label',
        align: 'center',
        width: '20'
    },{
        field: 'important',
        title: '<i class="fa fa-eye fa-2x"></i>',
        align: 'center',
        width: '20'
    },{
        field: 'refresh',
        title: 'Refresh',
        align: 'center',
        width: '20',
        class: 'refreshstats'
    }]
});
$('#table-javascript').one('mousemove', function() {
    $('.email').on('mouseover', function() {
        var thislink = $(this).attr('data-value');
        $.fn.editableform.buttons  = '<a href="mailto:'+thislink+'" target="_blank"><i class="fa fa-external-link"></i></a>';
    });
});
var$table=$('#table javascript')。bootstrapTable({
方法:“get”,
url:'bootstrap_database.php',
身高:2500,
cache:false,
条纹:是的,
分页:正确,
搜索:对,
页面大小:200,
页面列表:[20040010002000],
最小计数列:2,
单击选择:true,
栏目:[{
字段:“ID”,
标题:“ID”,
对齐:'居中',
可见:假
},{
字段:“反向链接”,
标题:“反向链接”,
对齐:“左”,
宽度:“20”
},{
字段:“已索引”,
标题:"PI",,
对齐:'居中',
宽度:“20”,
},{
字段:'dindexed',
标题:"DI",,
对齐:'居中',
宽度:“20”,
},{
字段:“电子邮件”,
标题:“电子邮件”,
对齐:'居中',
宽度:“20”
},{
字段:'社会',
标题:“社会+”,
对齐:'居中',
宽度:“20”
},{
字段:'谁',
标题:“Whois+”,
对齐:'居中',
宽度:“20”
},{
字段:'注释',
标题:‘注释’,
对齐:'居中',
宽度:“20”
},{
字段:'已删除',
标题:“删除”,
对齐:'居中',
宽度:“20”
},{
字段:“导入标签”,
标题:“标签”,
对齐:'居中',
宽度:“20”
},{
字段:“重要”,
标题:“”,
对齐:'居中',
宽度:“20”
},{
字段:“刷新”,
标题:“刷新”,
对齐:'居中',
宽度:“20”,
类:'refreshstats'
}]
});
HTML

<div id="table-javascript"></div>

x-可编辑代码

var $table = $('#table-javascript').bootstrapTable({
    method: 'get',
    url: 'bootstrap_database.php',
    height: 2500,
    cache: false,
    striped: true,
    pagination: true,
    search: true,
    pageSize: 200,
    pageList: [200, 400, 1000, 2000],
    minimumCountColumns: 2,
    clickToSelect: true,
    columns: [{
        field: 'ID',
        title: 'ID',
        align: 'center',
        visible: false
    },{
        field: 'backlink',
        title: 'Backlink',
        align: 'left',
        width: '20'
    },{
        field: 'indexed',
        title: 'PI',
        align: 'center',
        width: '20',
    },{
        field: 'dindexed',
        title: 'DI',
        align: 'center',
        width: '20',
    },{
        field: 'email',
        title: 'Email',
        align: 'center',
        width: '20'
    },{
        field: 'social',
        title: 'Social+',
        align: 'center',
        width: '20'
    },{
        field: 'whois',
        title: 'Whois+',
        align: 'center',
        width: '20'
    },{
        field: 'notes',
        title: 'Notes',
        align: 'center',
        width: '20'
    },{
        field: 'removed',
        title: '<i class="fa fa-chain"></i> Removed',
        align: 'center',
        width: '20'
    },{
        field: 'import_label',
        title: 'Label',
        align: 'center',
        width: '20'
    },{
        field: 'important',
        title: '<i class="fa fa-eye fa-2x"></i>',
        align: 'center',
        width: '20'
    },{
        field: 'refresh',
        title: 'Refresh',
        align: 'center',
        width: '20',
        class: 'refreshstats'
    }]
});
$('#table-javascript').one('mousemove', function() {
    $('.email').on('mouseover', function() {
        var thislink = $(this).attr('data-value');
        $.fn.editableform.buttons  = '<a href="mailto:'+thislink+'" target="_blank"><i class="fa fa-external-link"></i></a>';
    });
});
$('#table javascript').one('mousemove',function(){
$('.email')。on('mouseover',function(){
var thislink=$(this.attr('data-value');
$.fn.editableform.buttons='';
});
});
试试这个

$('#table-javascript').on('mouseover', '.email', function() {
    var thislink = $(this).attr('data-value');
    $.fn.editableform.buttons  = '<a href="mailto:'+thislink+'" target="_blank"><i class="fa fa-external-link"></i></a>';
});
$('#table javascript').on('mouseover','.email',function(){
var thislink=$(this.attr('data-value');
$.fn.editableform.buttons='';
});