Skip to content

Commit

Permalink
ScrollTo: fixed bracket typo + check for <title> element [fixes vojte…
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtech-dobes committed Aug 29, 2013
1 parent 65bc103 commit ec679c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/scrollTo.ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ec679c6

Please sign in to comment.