Open singpolyma opened 10 years ago
:+1:
It seems to work just fine if you swap prop
for attr
.
toggleOpen = function($details, $detailsSummary, $detailsNotSummary, toggle) {
var isOpen = $details.attr('open'),
close = isOpen && toggle || !isOpen && !toggle;
if (close) {
$details.removeClass('open').attr('open', false).triggerHandler('close.details');
$detailsSummary.attr('aria-expanded', false);
$detailsNotSummary.hide();
} else {
$details.addClass('open').attr('open', true).triggerHandler('open.details');
$detailsSummary.attr('aria-expanded', true);
$detailsNotSummary.show();
}
};
http://api.jquery.com/prop/ presumably there was a reason prop was used instead of attr
http://api.jquery.com/prop/ presumably there was a reason prop was used instead of attr
Specifically support for newer jQuery version: https://github.com/mathiasbynens/jquery-details/commit/3cc7fc6c6868570d614a217c316db6cf5dd451f5#diff-b76a01b9ccf8cf65939d876b7f8d079f
The spec defines an "open" attribute for showing the details as open/closed -- but only a prop is set by this fill-in, relying on a class fallback for selection/styling