Skip to content

Commit

Permalink
Using anchor without href while testing click handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
setnes committed Dec 7, 2015
1 parent a7bef2a commit b326073
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/galleryalbum.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'data-width="{{targetWidth}}" data-height="{{targetHeight}}">' +
' <div class="album-loader loading"></div>' +
' <span class="album-label">{{label}}</span>' +
' <a class="album" href="{{targetPath}}"></a>' +
' <a class="album"></a>' +
'</div>';

/**
Expand Down Expand Up @@ -54,12 +54,11 @@
targetHeight: targetHeight,
targetWidth: targetHeight,
label: album.name,
targetPath: '#' + encodeURIComponent(album.path)
});
album.domDef = $(template);
album.loader = album.domDef.children('.album-loader');
album.loader.hide();
album.domDef.click(album._showLoader.bind(album));
album.domDef.click(album._openAlbum.bind(album));

album._fillSubAlbum(targetHeight);

Expand Down Expand Up @@ -126,14 +125,15 @@
},

/**
* Shows a loading animation
* Shows a loading animation, opens the album.
*
* @param event
* @private
*/
_showLoader: function (event) {
_openAlbum: function (event) {
event.stopPropagation();
this.loader.show();
location.href = '#' + encodeURIComponent(this.path);
},

/**
Expand Down

0 comments on commit b326073

Please sign in to comment.