From ec679c60b5abd0e8347749e3518644abee3207ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Dobe=C5=A1?= Date: Thu, 29 Aug 2013 22:05:39 +0200 Subject: [PATCH] ScrollTo: fixed bracket typo + check for element [fixes #76] --- extensions/scrollTo.ajax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;