Skip to content

Instantly share code, notes, and snippets.

@andrewhassan
Created March 25, 2014 01:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewhassan/9753429 to your computer and use it in GitHub Desktop.
Save andrewhassan/9753429 to your computer and use it in GitHub Desktop.
for (var rfid in rfid_list) {
var clickHandler = function () {
$('html, body').animate({
scrollTop: $("[data-filter='rfid-" + rfid + "']").offset().top // When this runs, the value of rfid is the last value
}, 500);
};
// I removed unimportant code
text = g.click(clickHandler); // This is SnapSVG .click function
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment