Skip to content

Commit

Permalink
💄
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed Apr 7, 2015
1 parent c0b00b4 commit ee87954
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/jquery.remodal.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,10 @@
reason: reason
});

if (remodal.settings.hashTracking &&
remodal.$modal.attr('data-' + pluginName + '-id') === location.hash.substr(1)) {

if (
remodal.settings.hashTracking &&
remodal.$modal.attr('data-' + pluginName + '-id') === location.hash.substr(1)
) {
location.hash = '';
$(window).scrollTop(scrollTop);
}
Expand Down Expand Up @@ -420,9 +421,10 @@
instance = new Remodal($elem, opts);
$elem.data(pluginName, instance.index);

if (instance.settings.hashTracking &&
$elem.attr('data-' + pluginName + '-id') === location.hash.substr(1)) {

if (
instance.settings.hashTracking &&
$elem.attr('data-' + pluginName + '-id') === location.hash.substr(1)
) {
instance.open();
}
} else {
Expand Down

0 comments on commit ee87954

Please sign in to comment.