MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 6: Line 6:
     var cards = $('.card');
     var cards = $('.card');
     var showArticleWrapper = $('#show-article-wrapper');
     var showArticleWrapper = $('#show-article-wrapper');
    // Stop propagation for click events on '.people' links
    // This needs to be inside the document ready function but outside the cards' mousedown event listener
    $('.card .people a').on('click', function(event) {
        event.stopPropagation();
    });


     // Log a message if cards are found
     // Log a message if cards are found
Line 11: Line 17:
         console.log('Found all cards:', cards);
         console.log('Found all cards:', cards);


        // Stop propagation for click events on '.people' links
        $('.card .people a').on('click', function(event) {
            event.stopPropagation();
        });
       
         // Attach a mousedown event listener to each card
         // Attach a mousedown event listener to each card
         cards.on('mousedown', function (event) {
         cards.on('mousedown', function (event) {

Navigation menu