Difference between revisions of "MediaWiki:Common.js"

From TinkerMill Wiki
Jump to navigation Jump to search
m (Bug fix)
m (Bug fix)
Line 7: Line 7:
 
     if ( $.type( tm_load_todays_events ) === "function" ) {
 
     if ( $.type( tm_load_todays_events ) === "function" ) {
  
         if ( $("events-listing").length )
+
         if ( $("#events-listing").length )
 
             tm_load_todays_events();
 
             tm_load_todays_events();
  
 
     }
 
     }
 
}());
 
}());

Revision as of 01:04, 12 April 2022

/* Any JavaScript here will be loaded for all users on every page load. */
/* Reference: https://www.mediawiki.org/wiki/Adding_JavaScript_to_Wiki_Pages */

$(function() {

    // If meetup events module loaded, then load  event data onto certain pages
    if ( $.type( tm_load_todays_events ) === "function" ) {

        if ( $("#events-listing").length )
            tm_load_todays_events();

    }
}());