2015-07-13 39 views
1

我有CSS這樣的:jQuery的從一個元素中刪除:: CSS後

.support-hub .app-detail:after { 
    content: ""; 
    display: table; 
    clear: both; 
} 

螢火蟲其顯示爲

.support-hub .app-detail::after { 
    clear: both; 
    content: ""; 
    display: table; 
} 

在我的代碼我這樣做:

$('.support-hub .app-detail:after').css({'display':'inline'}); 

但是這個顯示屬性沒有改變。 請幫忙。非常少的文檔供:後使用jQuery

CSS操縱

回答

0

一個快速的解決方案是應用::後或::風格類(不是主要因素)之前,取下E級

0

你不能像這樣使用after。技術上DOM元素不能被jQuery用這個訪問。

簡單地嘗試這樣

$('.support-hub .app-detail').css({'display':'inline'}); 

或者你可以使用jQuery的next方法或像這樣操作DOM元素。

$('.support-hub .app-detail').next().css({'display':'inline'}); 

請參閱本Link

+0

我相信以後()用於插入元素。 – NeoWang

0

你可以將下面的代碼添加到您的CSS:

.support-hub .app-detail.inline:after { 
    content: ""; 
    display: inline; 
    clear: both; 
} 

而且你可以從JavaScript調用這個:

$('.support-hub .app-detail').addClass('');