Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
var wagonClass = $(this).attr('class'); | var wagonClass = $(this).attr('class'); | ||
var wagonSelection = $(wagonClass).text().split(' ')[0]; | var wagonSelection = $(wagonClass).text().split(' ')[0]; | ||
− | alert( | + | alert(wagonClass); |
}); | }); |
Revision as of 17:56, 2 August 2021
/* Any JavaScript here will be loaded for all users on every page load. */ $('#wagon-configurator-list li').click(function(){ $(this).addClass('selected'); $(this).siblings().removeClass('selected'); var wagonClass = $(this).attr('class'); var wagonSelection = $(wagonClass).text().split(' ')[0]; alert(wagonClass); });