Skip to content

Instantly share code, notes, and snippets.

@nambrot
Created January 5, 2012 21:50
Show Gist options
  • Save nambrot/1567510 to your computer and use it in GitHub Desktop.
Save nambrot/1567510 to your computer and use it in GitHub Desktop.
// PhotoThumbView
showPhoto: function () {
// remove the selected class from other elements
$(this.el).siblings().removeClass('selected');
// add it
$(this.el).addClass('selected');
// add the photo to the viewer
a.viewer.addModel(this.model, $(a.mainpane.el).scrollTop());
// add object to history
a.navigate('photo/'+this.model.get('id'), false);
// save our current state for the history
a.viewer.saveState();
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment