30251: Use jQuery.fn.toggle() instead of slideUp/slideDown if element is not in DOM

https://core.trac.wordpress.org/ticket/30251