我有我的加載,上載/圖片/燈箱but am not quite sure how to point jquery.lightbox-0.5.min.js to these files. It appears that no matter what I type in to try to point to the location in the lightbox script file, when I hover over the broken image links it ends up being
http:// locahost:8080/Home/Project /中的Lightbox,上一個/下一個/關閉按鈕。 。/ Content/Images/Lightbox/lightbox-btn-close.gif`jQuery Lightbox插件在ASP.NET MVC中顯示圖像圖標
這是當我進入燈箱腳本文件並將位置更改爲 ../Content/Images/Lightbox/lightbox-btn-close .gif相對於JavaScript文件(位於Scripts/jquery.lightbox-0.5.min.js
)。
似乎它只是增加了我所在頁面的當前位置,而../
沒有任何值,因爲它只是在當前URL的末尾添加一個文字字符串。我怎樣才能解決這個問題?
通常我會使用@ Url.Content(「〜/ Content/Images/Lightbox/lightbox-btn-close.gif」),但不太清楚如何將這種剃鬚刀語法添加到JavaScript文件中。 – 2012-04-11 00:22:45