2012-10-22 64 views
0

我正在使用jQuery Mobile和CodeIgniter。在我的索引頁中,LInk不能使用jQuery Mobile

http://localhost:8888/hwezemail2/index.php/welcome/student/index 

我有一個鏈接到另一個頁面。

http://localhost:8888/hwezemail2/index.php/welcome/student/myhomework/56 

但是,當我點擊鏈接,它會去下面,不顯示。

http://localhost:8888/hwezemail2/index.php/welcome/student/index#/hwezemail2/ 
index.php/welcome/student/myhomework/56 

然後我刷新頁面,一旦URL成爲

http://localhost:8888/hwezemail2/index.php/welcome/student/myhomework/56 

但它不顯示內容。所以我再次刷新它,然後顯示內容。

一旦顯示,那麼我沒有任何問題。這只是第一次。

我的PHP代碼如下。

echo '<a href="'. base_url().'index.php/welcome/student/myhomework/' 
.$userid.'" data-role="button" data-inline="true" data-transition="pop" 
data-icon="star" data-mini="true" data-theme="c">Missed Homework</a>'; 

回答

2

我向鏈接添加了data-ajax =「false」,問題解決了。

+0

謝謝,非常有幫助。 – Gavin