MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
(Created page with "→Any JavaScript here will be loaded for all users on every page load.: $('a').each(function(){ if ($(this).attr('href') && $(this).text():contains("Internal:")) { // g...") |
No edit summary |
||
Line 2: | Line 2: | ||
$('a').each(function(){ | $('a').each(function(){ | ||
if ($(this).attr('href') && $(this).text():contains( | if ($(this).attr('href') && $(this).text():contains('Internal')) { // get only links with href set | ||
$this.addClass("internal") | $this.addClass("internal") | ||
} | } | ||
}); | }); |
Revision as of 16:29, 2 November 2017
/* Any JavaScript here will be loaded for all users on every page load. */ $('a').each(function(){ if ($(this).attr('href') && $(this).text():contains('Internal')) { // get only links with href set $this.addClass("internal") } });