2016-12-31 94 views
0

我已經構建了一個採用表單數據的網頁。它使用引導來展開和摺疊表單的各個部分。摺疊和擴展可以手動和編程方式進行。如何以編程方式更改iPhone上的圖形元素?

沒有用的是通過事件改變圖形。

以下代碼適用於桌面,但不適用於iPhone。

$('.collapse').on(
    'shown.bs.collapse', function() 
    { 
     $(this).parent().find(".glyphicon-triangle-right").removeClass("glyphicon-triangle-right").addClass("glyphicon-triangle-bottom"); 
    } 
).on(
    'hidden.bs.collapse', function() 
    { 
     $(this).parent().find(".glyphicon-triangle-bottom").removeClass("glyphicon-triangle-bottom").addClass("glyphicon-triangle-right"); 
    } 
); 

有沒有辦法通過Safari上的代碼在iPhone上更改glyphicons?

+0

你能發表一個有效的例子嗎?您的解決方案適用於其他平臺但不適用於iPhone? –

+0

適用於Android,MacOSX而不適用於iOS –

回答

0

這原來是一個邊緣情況。它適用於更高版本的iOS Safari。

相關問題