Skip to content

Commit 4fc4dc4

Browse files
committed
Don't scroll to new alert if focus is false #2 and npm publish 1.0.3
1 parent 66d21e1 commit 4fc4dc4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

dist/bootstrap-alert-wrapper.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/bootstrap-alert-wrapper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@
5757
$(options.container).prepend(html);
5858
}
5959

60-
scrollTo($('#' + id), options.offset);
60+
if (options.focus) {
61+
scrollTo($('#' + id), options.offset);
62+
}
6163

6264
if (options.closeInSeconds > 0) {
6365
setTimeout(function () {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bootstrap-alert-wrapper",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Bootstrap alert wrapper factory for creating dynamic alert instances",
55
"keywords": [
66
"bootstrap",

0 commit comments

Comments
 (0)