dougui5419 2018-11-08 07:50
浏览 166

有关于DataTables paggingType =“input”的问题

i'm using datatables and for pagination i've used paggingtype = "input" and also included its plugin cdn but unfortunately when i used this, it is automatically disabling the First Next Previous and Last pagination buttons and i needed them enabled so that i can use them alongwith input text field.. Any help will be a huge favor

Here's my JavaScript:

$(document).ready(function () {
    $('#categories').DataTable({
        "processing" : true,
        "pagingType" : "input",
        "ajax" : {
            "url" : ajaxurl + "/ManageCategories/fetchCategories",
            "type" : "POST"
        }
    });
});

and here's my DataTable showing output: enter image description here

thanks, Ameer

  • 写回答

2条回答 默认 最新

  • doushan5245 2018-11-08 08:01
    关注

    I got a solution to my question i.e. whenever "paggingType" is used it will overwrite the default "paggingType" so in order to get a text input i can add it manually by inserting this javaScript:

    $("div.toolbar").html('<div><input type="text" id="pageJump" placeholder="page"> 
    <button id="jump" type="button">Go</button></div>');
    
    $('#jump').click( function() {
    table.page(parseInt($('#pageJump').val())-1).draw(false);
    }) 
    
    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料