Javascript 引导模式未显示

Javascript 引导模式未显示,javascript,jquery,twitter-bootstrap,modal-dialog,Javascript,Jquery,Twitter Bootstrap,Modal Dialog,当使用以下代码单击图像时,我尝试打开模式: <a href="#" data-toggle="modal" data-target="#download"><img class="featurette-image pull-right" src="http://i.imgur.com/96C9Nij.png"></a> <div class="modal fade" id="download" tabindex="-1" role="dialog" ar

当使用以下代码单击图像时,我尝试打开模式:

<a href="#" data-toggle="modal" data-target="#download"><img class="featurette-image pull-right" src="http://i.imgur.com/96C9Nij.png"></a>
<div class="modal fade" id="download" tabindex="-1" role="dialog" aria-labelledby="downloadlabel" aria-hidden="true">
<div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
      <h4 class="modal-title" id="downloadlabel">Download & Install Pixelmon</h4>
    </div>
    <div class="modal-body">
    <p>
      <strong>Installing Pixelmon</strong><br /><br />
    First, you'll need to install Forge, so simply double-click "minecraftforge-installer-x.x.x-x.xx.x.xxx" and a menu will pop up for you to install forge. 
    </p>
    <p>
    Once you have done that its recommended you open the minecraft launcher, create a new profile, and select the forge version from the version dropdown.<br>After this launch minecraft and check if forge is running properly.
    </p>
    <p>
    Now that forge is installed, you only have to copy "Pixelmon x.x.x.zip" to your %appdata%\roaming\.minecraft\mods folder.
    </p>
    <p>
    You will need to use the previously created profile ( the forge profile ) to play with Pixelmon.
    </p>
    <p>
    Now that you have Pixelmon installed, you may beggin your adventure on play.pokemasters.org
    </p>
    </div>
    <div class="modal-footer">
      <a href="http://download1076.mediafire.com/2yznx31i1d6g/693cqta45ppv0la/ForgePixelmon2.5.2.zip" target="blank"><button type="button" class="btn btn-danger">Download Pixelmon</button></a>.
      <button type="button" class="btn btn-info" data-dismiss="modal">Close</button>
    </div>
  </div>
 </div>
</div>

问题是,当我单击图像时,它没有出现。

您是否尝试过,$'download'.modalshow

显示或弹出模式的方式不止一种

您可以不使用脚本或onclick显示模态。 以下是一个例子:

<a href="#" data-toggle="modal" data-target="#download">
我希望它能在将来帮助你和其他人


提示:您也可以对一个模式使用data target和onclick。

您使用的是哪个引导版本?添加您所做的javascript更改删除第一行的href=并添加$document.readyfunction{$'download'.modaloptions};对于javascript:工作正常:谢谢:
<div id="download" class="popup">Your modal items/elements </div>
<a href="#" onclick="showmodal()" data-toggle="modal" data-target="#download">
<div id="download" class="popup">Your modal items/elements </div>
 function showmodal()
{
$("#download").modal("show");
}