Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/68.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
Jquery bootstrap3模式表未加载数据_Jquery_Twitter Bootstrap 3_Pug - Fatal编程技术网

Jquery bootstrap3模式表未加载数据

Jquery bootstrap3模式表未加载数据,jquery,twitter-bootstrap-3,pug,Jquery,Twitter Bootstrap 3,Pug,各位, 在bootstrap中,我一直在努力将一个modal绑定到我的桌子上 下面的代码确实启动了模式,但没有显示我试图传递的值。我尝试在此处复制功能: 现在,如果我从底部删除JavaScript部分,模态仍然会加载。。。我真的不知道如何让它工作:( 我想要的是: 通过在pendingArray上循环动态生成的表(正在工作) 单击的每个表项都将填充到模式中 代码: 问题出在JavaScript中 script. $('body').on('show.bs.modal', '.modal', fu

各位, 在bootstrap中,我一直在努力将一个modal绑定到我的桌子上

下面的代码确实启动了模式,但没有显示我试图传递的值。我尝试在此处复制功能:

现在,如果我从底部删除JavaScript部分,模态仍然会加载。。。我真的不知道如何让它工作:(

我想要的是:

  • 通过在pendingArray上循环动态生成的表(正在工作)
  • 单击的每个表项都将填充到模式中
  • 代码:


    问题出在JavaScript中

    script.
    $('body').on('show.bs.modal', '.modal', function () {
        var getIdFromRow = $(event.target).closest('tr').data('id');
        $(this).find('#orderDetails').html($('<b> Order Id selected: ' + getIdFromRow + '</b>'))
    });
    
    脚本。
    $('body').on('show.bs.modal','.modal',function(){
    var getIdFromRow=$(event.target).closest('tr').data('id');
    $(this).find('#orderDetails').html($('orderid selected:'+getIdFromRow+'')
    });
    
    script(src="https://code.jquery.com/jquery-1.11.0.min.js")
    script(src="https://code.jquery.com/jquery-migrate-1.2.1.min.js")
    script(src="https://code.jquery.com/ui/1.10.4/jquery-ui.js")
    script(src='/libs/bootstrap/js/bootstrap.min.js')
    
    script.
    $('body').on('show.bs.modal', '.modal', function () {
        var getIdFromRow = $(event.target).closest('tr').data('id');
        $(this).find('#orderDetails').html($('<b> Order Id selected: ' + getIdFromRow + '</b>'))
    });