mirror of
https://gh.wpcy.net/https://github.com/discourse/wp-discourse.git
synced 2026-05-24 04:53:57 +08:00
24 lines
No EOL
762 B
JavaScript
Vendored
24 lines
No EOL
762 B
JavaScript
Vendored
/* globals wpdc */
|
|
/**
|
|
* Toggles the hidden topic-map content.
|
|
*
|
|
* @package WPDiscourse
|
|
*/
|
|
|
|
(function( $ ) {
|
|
var clickTarget = 'true' === dctm.ajaxLoad ? '#wpdc-comments' : '.topic-map';
|
|
$( clickTarget ).on( 'click', "#toggle-expand", function() {
|
|
var expand_section = $( "#map-expanded" );
|
|
$( ".topic-map #arrow" ).toggleClass( 'dashicons dashicons-arrow-down-alt2 dashicons dashicons-arrow-up-alt2' );
|
|
|
|
if ( expand_section.css( "display" ) == "block" ) {
|
|
expand_section.css( 'display', 'none' );
|
|
} else {
|
|
expand_section.css( 'display', 'block' );
|
|
}
|
|
});
|
|
|
|
if ( $( '.popular-links > .popular-links-p' ).is( ':empty' ) ) {
|
|
$( '.popular-links' ).hide();
|
|
}
|
|
})( jQuery ); |