diff --git a/extensions/scrollTo.ajax.js b/extensions/scrollTo.ajax.js index 5412344..9385995 100644 --- a/extensions/scrollTo.ajax.js +++ b/extensions/scrollTo.ajax.js @@ -6,12 +6,12 @@ $.nette.ext('scrollTo', { init: function () { this.ext('snippets', true).before($.proxy(function ($el) { - if (this.shouldTry && $el.eq(0).tagName != 'TITLE') { + if (this.shouldTry && !$el.is('title')) { var offset = $el.offset(); scrollTo(offset.left, offset.top); this.shouldTry = false; } - }), this); + }, this)); }, success: function (payload) { this.shouldTry = true;