Skip to content

Commit

Permalink
Ajax loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Daguaa committed Mar 25, 2011
1 parent 1432aab commit e62cfb7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
35 changes: 14 additions & 21 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/views/movies/index.html.erb
Expand Up @@ -14,7 +14,7 @@ function scrollalert(){
var scrolltop=$('#scrollbox').attr('scrollTop');
var scrollheight=$('#scrollbox').attr('scrollHeight');
var windowheight=$('#scrollbox').attr('clientHeight');
var scrolloffset=20;
var scrolloffset=100;
if(scrolltop>=(scrollheight-(windowheight+scrolloffset)) && totalItems*3<nb_item)
{
//fetch new items
Expand All @@ -37,7 +37,7 @@ function scrollalert(){

<h1>Listing movies</h1>
<div id="container">
<div id="scrollbox" >
<div id="scrollbox" style="height:700px;width:990px;overflow:auto; overflow-x:hidden;" >
<div id="content" >
</div>
</div>
Expand Down

0 comments on commit e62cfb7

Please sign in to comment.