MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
| Line 25: | Line 25: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
var rows = $('.FixesTable').find(' | var rows = $('.FixesTable').find('title'); | ||
rows.on('click', function() { | rows.on('click', function() { | ||
var row = $(this); | var row = $(this); | ||
console.log(row); | console.log(row); | ||
if (row.find('a') !== null) { | if (row.find('a') !== null) { | ||
window.location = row.find('a').attr(' | window.location = row.find('a').attr('title');; | ||
} | } | ||
}); | }); | ||
Revision as of 17:35, 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('title');
rows.on('click', function() {
var row = $(this);
console.log(row);
if (row.find('a') !== null) {
window.location = row.find('a').attr('title');;
}
});
});
console.log("Thank you Byroo <3");