2013-01-07 61 views
0

HTML無法獲取jQuery的砌築工作

<div id="container"> 
<div class="item"> 
    <p>AAAAAAAAA amet tail frankfurter brisket, meatloaf beef ribs doner pork prosciutto ball tip rump tenderloin tongue. Pastrami fatback beef, sausage beef ribs venison tenderloin swine. Fatback leberkas kielbasa drumstick pork venison beef frankfurter. Turducken rump capicola, spare ribs leberkas brisket pork belly ball tip ground round. Tongue strip steak beef ribs shoulder.</p> 
    <p>Bacon ipsum dolor sit amet tail frankfurter brisket, meatloaf beef ribs doner pork prosciutto ball tip rump tenderloin tongue. Pastrami fatback beef, sausage beef ribs venison tenderloin swine. Fatback leberkas kielbasa drumstick pork venison beef frankfurter. Turducken rump capicola, spare ribs leberkas brisket pork belly ball tip ground round. Tongue strip steak beef ribs shoulder.</p> 
</div> 
<div class="item"> 
    <p>BBBBBBBBmet tail frankfurter brisket, meatloaf beef ribs doner pork prosciutto ball tip rump tenderloin tongue. Pastrami fatback beef, sausage beef ribs venison tenderloin swine. Fatback leberkas kielbasa drumstick pork venison beef frankfurter. Turducken rump capicola, spare ribs leberkas brisket pork belly ball tip ground round. Tongue strip steak beef ribs shoulder.</p> 
    <p>Bacon ipsum dolor sit amet tail frankfurter brisket, meatloaf beef ribs doner pork prosciutto ball tip rump tenderloin tongue. Pastrami fatback beef, sausage beef ribs venison tenderloin swine. Fatback leberkas kielbasa drumstick pork venison beef frankfurter. Turducken rump capicola, spare ribs leberkas brisket pork belly ball tip ground round. Tongue strip steak beef ribs shoulder.</p> 
    <p>Bacon ipsum dolor sit amet tail frankfurter brisket, meatloaf beef ribs doner pork prosciutto ball tip rump tenderloin tongue. Pastrami fatback beef, sausage beef ribs venison tenderloin swine. Fatback leberkas kielbasa drumstick pork venison beef frankfurter. Turducken rump capicola, spare ribs leberkas brisket pork belly ball tip ground round. Tongue strip steak beef ribs shoulder.</p> 
    <p>Bacon ipsum dolor sit amet tail frankfurter brisket, meatloaf beef ribs doner pork prosciutto ball tip rump tenderloin tongue. Pastrami fatback beef, sausage beef ribs venison tenderloin swine. Fatback leberkas kielbasa drumstick pork venison beef frankfurter. Turducken rump capicola, spare ribs leberkas brisket pork belly ball tip ground round. Tongue strip steak beef ribs shoulder.</p><p>Bacon ipsum dolor sit amet tail frankfurter brisket, meatloaf beef ribs doner pork prosciutto ball tip rump tenderloin tongue. Pastrami fatback beef, sausage beef ribs venison tenderloin swine. Fatback leberkas kielbasa drumstick pork venison beef frankfurter. Turducken rump capicola, spare ribs leberkas brisket pork belly ball tip ground round. Tongue strip steak beef ribs shoulder.</p> 
    </div> 

etc.... 

CSS

body { 
    background-color: red; 
} 

.container{ width:940px; margin:0px auto;} 

.item { 
    width: 220px; 
    margin: 10px; 
    float: left; 
    padding: 5px; 
    background-color: white; 
} 

我想不出什麼我做錯了。我甚至將默認的masontry代碼粘貼到我的編輯器中(http://jsfiddle.net/desandro/LDEGk/),並且它搞砸了。

http://jsfiddle.net/ntzMr/

這是位於身體標籤(該.js文件位於根文件夾中)我的腳本文件:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> 
<script src="/jquery.masonry.min.js"></script> 
+0

你的小提琴被拋出異常'遺漏的類型錯誤:對象的翻譯:有沒有方法「砌築」' –

+0

包容的'masonry'後的JavaScript它做工精細'http://jsfiddle.net/ arunpjohny/ntzMr/1 /' –

回答

1

它看起來像你的磚石圖書館的包容一些問題,添加砌體庫的外部資源後,您的代碼工作正常here

<script src="http://masonry.desandro.com/jquery.masonry.min.js"></script> 
+0

所以我說錯了,然後在我的頭標籤? – vytfla

+0

我這麼認爲,試着從砌體網站的資源文件 –

+0

是的,我從網站抓取了jquery.masonry.min.js,它在根目錄和html和css文件一起 – vytfla