dota220141003 2018-04-16 10:28
浏览 86

Bootstrap模式在jquery脚本中不起作用?

I am writing one jquery script inside that script having some bootstrap code for modal but its not working. If i used code outside script then its working only.

else if(arrayData[j].key=="47")
 {
    var  country = "Poland";
    var  color = "LIGHTSALMON";

                    '</a>|';
      check+= '<a  class="btn btn-success"  data-toggle="modal" data-target="#myModal">Poland</a>|';
      '<div id="myModal" class="modal fade" role="dialog">'+
          '<div class="modal-dialog">'+
            '<div class="modal-content">'+
              '<div class="modal-header">'+
                '<button type="button" class="close" data-dismiss="modal">&times;</button>'+
                '<h4 class="modal-title">Select Language</h4>'+
              '</div>'+
              '<div class="modal-body">'+
                '<a class="btn btn-success"  style="background-color : ' + color  + ';" href="<?php echo base_url()?>responsible/poland_pdf/'+arrayData[j].value+'">ENGLISH</a>'+
                '<a class="btn btn-success"  style="background-color : ' + color  + ';" href="<?php echo base_url()?>responsible/polish_pdf/'+arrayData[j].value+'">POLAND</a>'+
              '</div>'+
              '<div class="modal-footer">'+
                '<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>'+
              '</div>'+
          '</div>'+
          '</div>'+
        '</div>';   

 }

above code is inside jquery script. If i used this modal outside script its working. Is there any other way like using DIV outside of script. but i dont know how to use jquery variables outside script with php code.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?