MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
| Line 24: | Line 24: | ||
}); | }); | ||
console.log("Thank you Byroo <3"); | console.log("Thank you Byroo <3"); | ||
Revision as of 19:38, 10 January 2023
/* Any JavaScript here will be loaded for all users on every page load. */
/* Row click link */
$(document).ready(function() {
var rows = $('.TableShops').find('tr');
rows.on('click', function() {
var row = $(this);
console.log(row);
if (row.find('a') !== null) {
window.location = row.find('a').attr('href');;
}
});
});
/* Cell click link */
$(document).ready(function() {
var rows = $('.CRPShopTable').find('td');
rows.on('click', function() {
var row = $(this);
console.log(row);
if (row.find('a') !== null) {
window.location = row.find('a').attr('href');;
}
});
});
console.log("Thank you Byroo <3");