Created
February 28, 2016 21:11
-
-
Save 4knort/82ecf040f03189682898 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gallery.prototype.getPictureNumber = function(url) { | |
for (var i = 0; i < this.pictures.length; i++) { | |
if (url === this.pictures[i].url) { | |
this.currentPicture = i; | |
return i; | |
} else { | |
return -1; | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment