mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
262f3f2f7e
This changes every JS file in WordPress, so we need to test everything. Props netweb. See #36520. Built from https://develop.svn.wordpress.org/trunk@37212 git-svn-id: http://core.svn.wordpress.org/trunk@37178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
835 B
JavaScript
1 line
835 B
JavaScript
!function(a){function b(a){var b=a.closest(".accordion-section"),c=b.find("[aria-expanded]").first(),d=b.closest(".accordion-container"),e=d.find(".open"),f=e.find("[aria-expanded]").first(),g=b.find(".accordion-section-content");b.hasClass("cannot-expand")||(d.addClass("opening"),b.hasClass("open")?(b.toggleClass("open"),g.toggle(!0).slideToggle(150)):(f.attr("aria-expanded","false"),e.removeClass("open"),e.find(".accordion-section-content").show().slideUp(150),g.toggle(!1).slideToggle(150),b.toggleClass("open")),setTimeout(function(){d.removeClass("opening")},150),c&&c.attr("aria-expanded",String("false"===c.attr("aria-expanded"))))}a(document).ready(function(){a(".accordion-container").on("click keydown",".accordion-section-title",function(c){"keydown"===c.type&&13!==c.which||(c.preventDefault(),b(a(this)))})})}(jQuery); |