2009-11-07 103 views
0

似乎無法讓我的燈箱工作。有任何想法嗎?問題與LightBox jquery

<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" "href="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> 
+1

我建議你發佈一些代碼或至少一個鏈接 - 畢竟我們並不介意讀者。 – 2009-11-07 06:34:12

+0

讓代碼!!! @daveywhitney將來,選擇代碼並按下Ctrl-K進行格式化。未格式化代碼中的html標籤將被視爲html標籤,並且不會顯示。 – Amarghosh 2009-11-07 08:09:20

+0

對不起,我是新來的。感謝您的提示, – Davey 2009-11-07 15:21:19

回答

1

沒有測試任何東西,或在問題的密切關注,你試過從href屬性之前刪除不正確放置引號?

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

你的選擇不正確,「@」不再使用(不建議使用,LOL我不認爲這個詞沒有我的早晨caffiene)。試試這個:

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

您是否意味着棄用? – Amarghosh 2009-11-09 05:54:53

+0

大聲笑我從來沒有聲稱我可以正確閱讀或者... – Mottie 2009-11-09 07:16:13