Use .css() instead of .show() and .hide()

jQuery's .show() and .hide() make some actions which are not needed here.

Change-Id: I606430fa1922841f9974d7334f646fcedbf03173
This commit is contained in:
Fomafix 2021-08-31 22:16:32 +00:00 committed by Thiemo Kreuz (WMDE)
parent 6c36a1a3d7
commit 3f38eb6cd1

View file

@ -35,7 +35,7 @@
// Show the children node // Show the children node
var $children = $link.parents( '.CategoryTreeItem' ) var $children = $link.parents( '.CategoryTreeItem' )
.siblings( '.CategoryTreeChildren' ) .siblings( '.CategoryTreeChildren' )
.show(); .css( 'display', '' );
$link.attr( { $link.attr( {
title: mw.msg( 'categorytree-collapse' ), title: mw.msg( 'categorytree-collapse' ),
@ -56,7 +56,7 @@
// Hide the children node // Hide the children node
$link.parents( '.CategoryTreeItem' ) $link.parents( '.CategoryTreeItem' )
.siblings( '.CategoryTreeChildren' ) .siblings( '.CategoryTreeChildren' )
.hide(); .css( 'display', 'none' );
$link.attr( { $link.attr( {
title: mw.msg( 'categorytree-expand' ), title: mw.msg( 'categorytree-expand' ),