2014-01-26 37 views
0

我有兩個網站是相同的,一個工作,其他不完全是哪個得到一個JavaScript錯誤。

主要功能是用戶點擊SAVE NOW按鈕,並且file.js將驗證Save Now功能並允許用戶繼續購物車,Continue按鈕位於「Design Not Saved Button」 」。購物車位於編輯器上方的隱藏面板上,繼續按鈕取消隱藏名爲「cart」的隱藏面板。在這個購物車面板上有一個腳本price.js的貝寶形式。

這可以在第一個鏈接中正常工作,但在下面列出的第二個鏈接中,Throbber映像只是旋轉並且不會驗證保存功能,因此允許用戶永遠不會繼續購物車。

我假設您可以通過訪問上述鏈接輕鬆找到file.js和popular_prices.js。

我不是最大的編碼器(自學和危險),我非常難以接受這一點,任何人都可以建議如何解決這個問題,並用簡單的術語解釋它,我可能會理解?

預先感謝您!

工作環節: http://www.budgetsignstore.com/popular-sign-designer.html?320-1c-automotive-magnet-banner-template-green-auto-south-detail

不工作的鏈接: http://www.lowcostsigns.com/banner-editor.html?320-1c-automotive-magnet-banner-template-green-auto-south-detail

這裏是我得到的錯誤:

[1/26/2014 11:07:31 AM] JavaScript - http://www.lowcostsigns.com/low-cost-signs-online-editor.html?320-1c-automotive-magnet-banner-template-green-auto-south-detail 
Inline script thread 
Uncaught exception: ReferenceError: Undefined variable: $ 
Error thrown at line 3, column 0 in http://www.lowcostsigns.com/file.js: 
    $(document).ready(function() { 
[1/26/2014 11:07:31 AM] JavaScript - http://www.lowcostsigns.com/low-cost-signs-online-editor.html?320-1c-automotive-magnet-banner-template-green-auto-south-detail 
Inline script thread 
Uncaught exception: ReferenceError: Undefined variable: $ 
Error thrown at line 467, column 0 in http://www.lowcostsigns.com/popular_prices.js: 
    $(document).ready(function() { 
+0

你可能沒有加載jQuery庫,因此$,它代表jQuery對象,是沒有定義。 –

+0

請看看這個Meta討論[我的網站或項目中的某些內容不起作用。我可以只粘貼一個鏈接嗎?](http://meta.stackexchange.com/q/125997/142802)。 –

+0

謝謝Pavel S.對我的理解非常有幫助。 – Mahogan

回答

0

在行118:<script type="text/javascript" src="wpscripts/jquery.js"></script>

嘗試將其移至第24行以上:<script type="text/javascript" src="wpscripts/jsNavBarFuncs.js"></script>

+0

謝謝大家幫助我!將jquery從第118行移動到第24行非常完美!現在我比以前更瞭解了一點,未來應該能夠解決這個問題。 wsiwyg程序將代碼放置在一個奇怪的地方,所以這個答案太多了!再次感謝! – Mahogan

0

正如我在加載jQuery之前加載該文件的代碼中看到的那樣。請 移動你的

<script type="text/javascript" src="wpscripts/jquery.js"></script> 

的頭頂部

+0

謝謝你的回答!很有幫助! – Mahogan

相關問題