1
我以前沒有使用過這個插件。什麼現在我得到的是:獲取'環球免稅店未定義'異常
附送腳本
<script src="@Url.Content("~/Content/Scripts/jquery-1.7.1.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/Scripts/themes/classic/galleria.classic.min.js")" type="text/javascript"></script>
我引用galleria
主題head
標籤內。我已經檢查了JQuery
和Galleria
腳本的可見性,使用Chrome web developer tools
(並且簡單地呼叫$("body").text("jQuery works");
以確保我自己Jquery
工作)。
<script type="text/javascript">
// $("body").text("jQuery works");
$(document).ready(function() {
$("#gallery").galleria({
width: 750,
height: 300,
clicknext: true
});
} // function() {
); // $(document).ready(
</script>
CSHTML
<fieldset>
@* other things*@
@if(Model.AttachedInformation.Count > 0)
{
<div id="gallery">
@foreach(var path in Model.AttachedInformation)
{
<img src="@path" alt="" width="50" height="50" />
}
</div>
}
</fieldset>
Two moment are unclear for now
:可予保持div
其然後風格用於通過gelleria
一個fieldset
內識別; Chrome
給我的信息是Galleria is not defined
。
需要諮詢! 謝謝!
編輯
它表明該廣場JavaScript文件沒有被包括在內。你確定這個網址對它是正確的嗎?打開元素資源管理器中的頭部並單擊URL以確保。 – Archer 2012-03-06 13:53:58
看看我的編輯。 – lexeme 2012-03-06 14:23:39