Skip to content

Commit 2a1e1af

Browse files
committed
Reinitiliaze to scrollTo 0 when showing new contents. Fix #164
1 parent aace5e7 commit 2a1e1af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/jquery.nyroModal.js

+2
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ jQuery(function($, undefined) {
440440
this._callFilters('afterShowCont');
441441
this.elts.cont.append(this._scriptsShown);
442442
this._reposition();
443+
this.elts.cont.scrollTop(0);
443444
}, this));
444445
}, this);
445446
if (this._nbContentLoading == 1) {
@@ -454,6 +455,7 @@ jQuery(function($, undefined) {
454455
this._callAnim('showCont', $.proxy(function() {
455456
this.elts.cont.append(this._scriptsShown);
456457
this._reposition();
458+
this.elts.cont.scrollTop(0);
457459
}, this));
458460
}, this));
459461
}

0 commit comments

Comments
 (0)