MediaWiki: Common.js: Unterschied zwischen den Versionen

Aus Joachim Camerarius (1500-1574)
Wechseln zu: Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 3: Zeile 3:


var $table = $('table.wikitable');
var $table = $('table.wikitable');
$table.floatThead();
$table.floatThead({
    responsiveContainer: function($table){
        return $table.closest('.table-responsive');
    }
});


/***************************************************************/
/***************************************************************/

Version vom 19. November 2018, 13:16 Uhr

/* Das folgende JavaScript wird für alle Benutzer geladen. */


var $table = $('table.wikitable');
$table.floatThead({
    responsiveContainer: function($table){
        return $table.closest('.table-responsive');
    }
});

/***************************************************************/
/************ Animate stat-counter on main page ***************/
/**************************************************************/

$('.counting').each(function() {
  var $this = $(this),
      countTo = document.getElementById('numberOfPrints').value;
  
  $({ countNum: $this.text()}).animate({
    countNum: countTo
  },

  {

    duration: 2000,
    easing:'linear',
    step: function() {
      $this.text(Math.floor(this.countNum));
    },
    complete: function() {
      $this.text(this.countNum);
      //alert('finished');
    }

  });  

});