MediaWiki: Common.js: Unterschied zwischen den Versionen
Aus Interlinking_Pictura
Zeile 15: | Zeile 15: | ||
$(window).load(function() { | $(window).load(function() { | ||
+ | |||
+ | jQuery('#firstHeading > span').html(); | ||
+ | var myDiv = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title'); | ||
+ | |||
+ | if ( myDiv.length){ | ||
+ | //you can now reuse $myDiv here, without having to select it again. | ||
+ | var val = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title ').ignore("span").html(); | ||
+ | jQuery('#firstHeading > span').html(val); | ||
+ | } | ||
// I changed rearranger image(by Adrian) | // I changed rearranger image(by Adrian) | ||
Zeile 37: | Zeile 46: | ||
jQuery(document).ready(function() { | jQuery(document).ready(function() { | ||
var $ = jQuery.noConflict; | var $ = jQuery.noConflict; | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}); | }); | ||
//</source> | //</source> |
Version vom 16. November 2017, 16:32 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */ //<source lang="javascript"> // This JavaScript will be loaded for all users on every page load. // Except for additions at the end, imported from en.wikipedia.org and modified (parts removed). // for authors see http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=history // Alias $j to jQuery for backwards compatibility window.$ = jQuery; // Attach to window and globally alias window.mw = window.mediaWiki = mw; jQuery.fn.ignore = function(sel){ return this.clone().find(sel||">*").remove().end(); }; $(window).load(function() { jQuery('#firstHeading > span').html(); var myDiv = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title'); if ( myDiv.length){ //you can now reuse $myDiv here, without having to select it again. var val = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title ').ignore("span").html(); jQuery('#firstHeading > span').html(val); } // I changed rearranger image(by Adrian) jQuery('img.rearrangerImage').attr('src','http://interlinking-pictura.semantic-cora.org/upload/rearranger.png'); // I changed dull-blue-circle.png (from blue to orange) (by Adrian) jQuery('img.timeline-copyright').attr('src','http://interlinking-pictura.semantic-cora.org/upload/Copyright-vertical.png'); // jQuery('div.timeline-band-layer-inner > div > img').attr('src','http://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png'); jQuery('div.timeline-band-layer-inner > div > img').each(function(){jQuery(this).attr('src','http://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png');}); //I changed the slim bottom lines (in fact it is border color left) from blue to orange (by Adrian) jQuery('div.timeline-band-layer-inner > div').each(function(){ if(jQuery(this).css('border-left-color') == 'rgb(88, 160, 220)') { jQuery(this).css('border-left-color','rgb(247,102,0)'); } }); alert( jQuery('#firstHeading > span').html()); }); jQuery(document).ready(function() { var $ = jQuery.noConflict; }); //</source>