fix docs row click jumping, close #3609
This commit is contained in:
parent
39bf8e209c
commit
217a4beaf9
@ -6374,14 +6374,19 @@ var Leaflet = L.noConflict();
|
||||
|
||||
<script>
|
||||
var tables = document.getElementsByTagName('table');
|
||||
|
||||
for (var i = 0, len = tables.length; i < len; i++) {
|
||||
var id = tables[i].getAttribute('data-id'),
|
||||
tds = tables[i].getElementsByTagName('td');
|
||||
|
||||
for (var j = 0, tdLen = tds.length; j < tdLen; j++) {
|
||||
if (tds[j].cellIndex === 0) {
|
||||
tds[j].parentNode.id = id + '-' + (tds[j].textContent || tds[j].innerText).split('(')[0].toLowerCase();
|
||||
|
||||
tds[j].parentNode.onclick = function(e) {
|
||||
window.location.hash = '#' + this.id;
|
||||
if (e.offsetX < 0) {
|
||||
window.location.hash = '#' + this.id;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user