Difference between revisions of "MediaWiki:Common.js"

From WeSISpedia
Jump to: navigation, search
(Created page with "Any JavaScript here will be loaded for all users on every page load.: $(document).ready(function() { $('#example').DataTable(); } );")
 
 
(9 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
$(document).ready(function() {
 
$(document).ready(function() {
     $('#example').DataTable();
+
 
 +
  mw.loader.using( 'ext.datatables', function() {
 +
      // Add the default datatables markup
 +
     $('#ccode').DataTable( {
 +
        "order": [[ 1, "asc" ]],
 +
        "lengthMenu": [[100, 150, 200, -1], [100, 150, 200, "All"]],
 +
    } );
 +
});
 +
   
 +
 
 
} );
 
} );

Latest revision as of 16:23, 12 December 2018

/* Any JavaScript here will be loaded for all users on every page load. */

$(document).ready(function() {

   mw.loader.using( 'ext.datatables', function() {
      // Add the default datatables markup
    $('#ccode').DataTable( {
        "order": [[ 1, "asc" ]],
        "lengthMenu": [[100, 150, 200, -1], [100, 150, 200, "All"]],
    } );
 });
    

} );