MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Tag: Reverted
Line 285: Line 285:
             '</div>';
             '</div>';
     }
     }
   
    $(document).on('mousedown', function (event) {
$(document).on('mousedown', function (event) {
    // Check if the click is outside of the #show-article-wrapper and not on a card
        // Check if the click is outside of the #show-article-wrapper and not on a card
    // Now also checking if it's not on a card within #list-list
        if (!showArticleWrapper.is(event.target) && showArticleWrapper.has(event.target).length === 0 && !$(event.target).hasClass('card')) {
    if (!showArticleWrapper.is(event.target) &&  
            // Remove the fade-out class when hiding the fixed column
        showArticleWrapper.has(event.target).length === 0 &&  
            $('#list').removeClass('fade-out');
        !$(event.target).closest('#list, #list-list').find('.card').length) {
            showArticleWrapper.css('display', 'none');
       
        }
        // Remove the fade-out class when hiding the fixed column
    });  
        $('#list, #list-list').removeClass('fade-out');
        showArticleWrapper.css('display', 'none');
    }
});


     $('#close-button').on('click', function () {
     $('#close-button').on('click', function () {

Navigation menu