MediaWiki:Mobile.js: Unterschied zwischen den Versionen

/* $( document ).ready(function() {

   if(document.getElementById("content-collapsible-block-0")) {

document.getElementById("content-collapsible-block-0").className = "mf-section-1 collapsible-block open-block";

   }

}); */

$('#content-collapsible-block-0').on( 'ready', function( e ) {

                    $('#content-collapsible-block-0').addClass('mf-section-1 collapsible-block open-block');

            

});


$( '.transclusion-container .additional' ).each(function() {

   var $elem = $(this);
   var $toggle = $('<a href="#" class="bs-icon-info"></a>');
   $toggle.on( 'click', function( e ) {
       $elem.toggleClass( 'show' );
       e.defaultPrevented = true;
       return false;
   });
   $toggle.insertBefore( $elem );

});

$( '.languageselector' ).each(function() {

   var languages = [ 'de', 'en', 'cz', 'pl', 'hu' ];
   var $selector = $('<select>');
   for( var i = 0; i < languages.length; i++ ) {
       var language = languages[i];
       var $option = $('<option>');
       $option.html( language  );
       $option.val( language  );
       $selector.append( $option );
   }
   $(this).append( $selector );

});

/* $( ).no-js-only, .client-js .jsonly {

   display: none;

}

  • /
/* $( document ).ready(function() {
        
            if(document.getElementById("content-collapsible-block-0")) {
        
        		document.getElementById("content-collapsible-block-0").className = "mf-section-1 collapsible-block open-block";
        
            }
        
        }); */
        
        
        
        $('#content-collapsible-block-0').on( 'ready', function( e ) {
            
                 $('#content-collapsible-block-0').addClass('mf-section-1 collapsible-block open-block');
        
        
        
            
            
            
            
        });
            
            
            
            
            
            
            
            
        $( '.transclusion-container .additional' ).each(function() {
        
            var $elem = $(this);
        
            var $toggle = $('<a href="#" class="bs-icon-info"></a>');
        
            $toggle.on( 'click', function( e ) {
        
                $elem.toggleClass( 'show' );
        
                e.defaultPrevented = true;
        
                return false;
        
            });
        
            $toggle.insertBefore( $elem );
        
        });
        
        
        
        $( '.languageselector' ).each(function() {
        
            var languages = [ 'de', 'en', 'cz', 'pl', 'hu' ];
        
            var $selector = $('<select>');
        
            for( var i = 0; i < languages.length; i++ ) {
            
                    var language = languages[i];
            
                    var $option = $('<option>');
        
                $option.html( language  );
        
                $option.val( language  );
        
        
        
                $selector.append( $option );
        
            }
        
            $(this).append( $selector );
        
        });
        
        
        
        /*
        
        $( ).no-js-only, .client-js .jsonly {
        
            display: none;
        
        }
        
        */
Zeile 5: Zeile 5:
 
}); */
 
}); */
  
$('#content-collapsible-block-0').addClass('mf-section-1 collapsible-block open-block');
+
$('#content-collapsible-block-0').on( 'ready', function( e ) {
 +
    $('#content-collapsible-block-0').addClass('mf-section-1 collapsible-block open-block');
 +
});
 +