WordPress/wp-admin/js/accordion.min.js
Bot (Assets) 71a7985531 Compress scripts/styles: 3.6-beta4-24681.
git-svn-id: http://core.svn.wordpress.org/trunk@24681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-12 18:58:55 +00:00

1 line
814 B
JavaScript

(function(f){f(document).ready(function(){f(".accordion-container").on("click keydown",".accordion-section-title",function(g){if(g.type==="keydown"&&13!==g.which){return}g.preventDefault();a(f(this));b()});f(".hide-postbox-tog").click(function(){e()})});var c=f(".accordion-container li.accordion-section"),d=f(".accordion-section-content");function b(){c.removeClass("top bottom");c.filter(":visible").first().addClass("top");c.filter(":visible").last().addClass("bottom").find(d).addClass("bottom")}function e(){a(c.filter(":visible").first());b()}function a(g){var i=g.closest(".accordion-section"),j=i.parent().find(".open"),h=i.find(d);if(i.hasClass("cannot-expand")){return}j.removeClass("open");j.find(d).show().slideUp(150);h.toggle(i.hasClass("open")).slideToggle(150);i.toggleClass("open")}e()})(jQuery);