MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary Tag: Reverted |
||
| Line 24: | Line 24: | ||
}); | }); | ||
$(document).ready(function() { | |||
var rows = $('.FixesTable').find('span'); | |||
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"); | console.log("Thank you Byroo <3"); | ||
Revision as of 17:14, 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');;
}
});
});
$(document).ready(function() {
var rows = $('.FixesTable').find('span');
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");