mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Use exact word for parameter scroll #74493
https://bugs.php.net/bug.php?id=74493
This commit is contained in:
@@ -407,9 +407,9 @@ $(document).ready(function() {
|
||||
$('.refentry code.parameter').click(function(event)
|
||||
{
|
||||
var id = $(this).text().replace(/^[&$]{0,2}/g, '');
|
||||
var offsetTop = $(
|
||||
'.parameters .parameter:contains("' + id + '"), .options .parameter:contains("' + id + '")'
|
||||
).offset().top - 52;
|
||||
var offsetTop = $('.parameters, .options').find('.parameter').filter(function() {
|
||||
return $(this).text() === id;
|
||||
}).offset().top - 52;
|
||||
$.scrollTo({top: offsetTop, left: 0}, 400);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user