开发者

Problem with LightBox Jquery

Can't seem to get my lightbox to work. Any ideas?

<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" />

<title>WildFire</title>

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.lightbox-0.5.pack.js"></script>


<script type="text/javascript">
$(function() {
    // Use this example, or...
    $('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel

});
</script>


</head>

<body>

<div id="wrapper">

<div id="body">


<img src="images/tempbar.png">

<div id="text">

<img class="logo" src="images/logo.png">


<ul class="info">
<li>Hours: </li>
<p>
<li> Lunch 11am - 3pm </li>
<li> Dinner 5pm - 10pm </li>
<p>
<li>Phone: </li>
<p>
<li>(607) 277-9143</li>
<p>
<li>Address: </li>
<p>
<li> 106 S Cayuga St </li>
<li>Ithaca, NY 14850 </li>


</ul>

<p class="linkouts">

<a rel="lightbox" "hre开发者_开发百科f="images/lunch.png">
<img src="images/lunchlink.png">
</a>

<p>


<img src="images/dinnerlink.png">


</div>



</div>

<div id="footer">

For Lounge Events Find Us On 

<a href="http://www.facebook.com/pages/Ithaca-NY/WildFire-Lounge/144229581885?ref=ts" target="_blank">
<img class ="fb" src="images/loungefb.png">
</a>

Come Visit

<a href="http://www.madelines-restaurant.com/" target="_blank">
<img class="mad" src="images/madelineslogo.png">
</a>

And Our Friend

<a href="http://www.stateofithaca.com/" target="_blank">
<img class="state" src="images/stlogo.png"
</a>


</div>


</div>
</body>
</html>


Your selector is incorrect, the "@" is no longer used (deprecated, LOL I couldn't think of the word without my morning caffiene). Try this instead:

$(function() {
 $('a[rel="lightbox"]').lightBox();
});


Without testing anything else or looking closely at the problem, have you tried removing the incorrectly-placed quote mark from before the href attribute?

<a rel="lightbox" href="images/lunch.png">
<img src="images/lunchlink.png">
</a>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜