Skip to content

Instantly share code, notes, and snippets.

@yaph
Created February 26, 2013 16:06
Show Gist options
  • Save yaph/5039629 to your computer and use it in GitHub Desktop.
Save yaph/5039629 to your computer and use it in GitHub Desktop.
var routes = [];
var route = {};
$('.datenhellgrau td').each(function(idx, item){
if ('sp1_1' == $(item).attr('headers')) {
route = {};
route['name'] = $(item).text();
}
else if ('sp1_2' == $(item).attr('headers')) {
route['gpx'] = $($(item).find('.download a')[0]).attr('href')
.replace('../../download/gps_tracks/', '/gpx/');
routes.push(route);
}
});
JSON.stringify(routes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment