Created
June 4, 2016 18:23
-
-
Save rafaelaugustos/bb0758829e2948398663308faac3f0fe to your computer and use it in GitHub Desktop.
This file contains 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
$(function(){ | |
var pagina = 0; | |
function loading(){ | |
$.ajax({ | |
type: 'POST', | |
url: 'http://getmyidol.com/webservice/PDO/searchArtistDemand.php', | |
data: 'page='+pagina, | |
cache: false, | |
dataType: 'html', | |
success: function(data){ | |
console.log(data); | |
$('#wrapSpotArtistas').append(data); | |
} | |
}); | |
} | |
loading(); | |
$('#spotArtistas').scroll(function(){ | |
if($('#spotArtistas').scrollTop() + $('#spotArtistas').height() >= $(document).height()){ | |
pagina += 1; | |
loading(); | |
} | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment