2013-07-19 54 views
0

在phonegap jquery移動index.html有achor href到服務器端(http://mywebsite.com/products.html和NOT使用rel = external)。當點擊並加載時,如何確保index.html中的js文件仍可由products.html訪問。Phonegap jquerymobile href到服務器端html

看來,當product.html加載時,index.html中的.js文件無法訪問。我不想在products.html中重複所有這些。這有什麼解決辦法?當不在PhoneGap和瀏覽器中運行時,index.html中的.js腳本文件仍然可用。

我使用最新版本的phonegap和jquery mobile 1.3.0和jquery 1.7。

+1

即使ü添加它們會有貝諾性能問題 –

回答

0

如果您使用jQuery的手機使用 它是一樣的,你使用$ .load 所以你的腳本和樣式表在yoursite不加載。 但是,如果你把你的腳本和CSS數據角色裏面=「頁」你的JS和CSS可以負荷.. 例如

<body> 
    <div data-role="page"> 
     your js file and css file place in here for can be load 
    </div> 
</body>