Skip to content

Instantly share code, notes, and snippets.

@caionorder
Created May 5, 2016 13:26
Show Gist options
  • Save caionorder/26e93eab736e1a6f9e1b881b4bd51ca6 to your computer and use it in GitHub Desktop.
Save caionorder/26e93eab736e1a6f9e1b881b4bd51ca6 to your computer and use it in GitHub Desktop.
Script para pegar eventos internacionais do site Uroweb
var lista = $('.inner');
for (i = 0; i < lista.length; i++){
var year = $(lista[i]).find('.year').html();
var day = $(lista[i]).find('.day').html();
var month = $(lista[i]).find('.month').html();
var event = $(lista[i]).find('h3 a').html();
var local = $(lista[i]).find('.event_details .c5').html();
var infos = $(lista[i]).find('.cols').html();
var layout = '<li>'+
'<table>'+
'<tbody>'+
'<tr class="black">'+
'<td width="80%">Date: '+day+' / '+month+' / '+event+'</td>'+
'<td colspan="2" width="10%">'+local+'</td>'+
'</tr>'+
'<tr style="display: none;" class="hide">'+
'<td colspan="3">'+
infos
'</td>'+
'</tr>'+
'</tbody>'+
'</table>'+
'</li>';
$(layout).appendTo('#recebeInfo');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment