我禁用了特定的手风琴,并希望将它们的图标更改为 ui-icon-locked。
我有:
$(document).ready(function() {
$(function() {
$( "#accordion" ).accordion();
$("#accordion").accordion("option", "icons",
{ 'header': 'ui-icon-circle-plus', 'headerSelected': 'ui-icon-circle-minus' });
$( ".disabled" ).addClass("ui-state-disabled");
});
和:
<h6 class="disabled">Bacteriology in practice: interactive modules</h6>
<div>
<p class="text"> Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
我在css中尝试过:
.ui-accordion-header.disabled .ui-icon {
ui-icon-locked;
}
但这不起作用。
这也不起作用:
$(function() {
$( "#accordion" ).accordion();
$("#accordion").accordion("option", "icons",
{ 'header': 'ui-icon-circle-plus', 'headerSelected': 'ui-icon-circle-minus' });
$( ".disabled" ).addClass("ui-state-disabled");
$(".disabled").accordion("option", "icons",
{ 'header': 'ui-icon-locked', 'headerSelected': 'ui-icon-locked' });
$( ".disabled" ).addClass("ui-state-disabled");
});
有任何想法吗?