我正在尝试使用下面的代码弹出一个精美的盒子,但我收到以下错误。 无法加载请求的内容。请稍后再试
$(".sizing-link").on("click", function(event) {
$(".sizing-link").fancybox();
});
<a href="#" class="sizing-link">What's my size</a>
<div style="display: none">
<div id="inlineContent">
<h2>Sizing Guide</h2>
<table border="0" cellpadding="0" cellspacing="0" style="width: 713px;">
<colgroup>
<col width="129">
<col span="8" width="73">
</colgroup>
<tbody>
<tr>
<td class="xl75" height="27" width="129">Waist - Jeans</td>
<td class="xl65" width="73">(+/-)</td>
<td class="xl66" width="73">30</td>
<td class="xl66" width="73">32</td>
<td class="xl66" width="73">34</td>
<td class="xl66" width="73">36</td>
<td class="xl66" width="73">38</td>
<td class="xl66" width="73">40</td>
<td class="xl66" width="73">42</td>
</tr>
<tr>
<td class="xl75" height="24">Waist - Brand's</td>
<td class="xl68"> </td>
<td class="xl69">30</td>
<td class="xl70">32</td>
<td class="xl70">34</td>
<td class="xl70">36</td>
<td class="xl70">38</td>
<td class="xl70">40</td>
<td class="xl71">42</td>
</tr>
<tr>
<td class="xl75" height="24">Leg Opening</td>
<td class="xl68"> 1/8</td>
<td class="xl74">7 3/4</td>
<td class="xl70">8</td>
<td class="xl72">8 1/4</td>
<td class="xl72">8 3/4</td>
<td class="xl72">9 1/4</td>
<td class="xl72">9 1/2</td>
<td class="xl73">9 3/4</td>
</tr>
<tr>
<td class="xl75" height="24">Hip</td>
<td class="xl68"> 1/2</td>
<td class="xl69">38</td>
<td class="xl70">40</td>
<td class="xl70">42</td>
<td class="xl70">44</td>
<td class="xl70">46</td>
<td class="xl70">48</td>
<td class="xl71">50</td>
</tr>
<tr>
<td class="xl75" height="24">Thigh</td>
<td class="xl68"> 1/4</td>
<td class="xl69">23</td>
<td class="xl70">24</td>
<td class="xl70">25</td>
<td class="xl70">27</td>
<td class="xl70">28</td>
<td class="xl70">29</td>
<td class="xl71">30</td>
</tr>
<tr>
<td class="xl75" height="24">Knee</td>
<td class="xl76"> 1/8</td>
<td class="xl77">8</td>
<td class="xl78">8 1/4</td>
<td class="xl78">8 1/2</td>
<td class="xl79">9</td>
<td class="xl78">9 1/2</td>
<td class="xl78">9 3/4</td>
<td class="xl80">10</td>
</tr>
</tbody>
</table>
</div>
</div>
答案 0 :(得分:1)
而不是这个
$(".sizing-link").on("click", function(event) {
$(".sizing-link").fancybox();
});
只尝试
$(".sizing-link").fancybox();
(您不需要.on("click")
方法)
... 和代替此
<a href="#" class="sizing-link">What's my size</a>
试试这个
<a href="#inlineContent" class="sizing-link">What's my size</a>