[jQuery] Loading More Entries According to the Users Screen Size
<div><div>I'm a novice user of JQuery and there is something I want to do but I'm not sure whether JQuery can help me with this or not. Here is what I want to do:</div><div>
</div><div>Basically I have an on scroll feature that loads more entries when a user scrolls down. So I have that working, np there. But the problem is that the scroll bar doesn't show up on the page because the initial number of entries, onPageLoad aren't enough. </div>
<div>
</div><div>onPageLoad, I want to be able to dynamically add more entries according to the users screen size.</div><div>
</div><div>The following are the functions I have:</div><div>
</div><div>loadEntries() --> xmlhttpRequest that gets the data and appends it on the screen</div>
<div>getMaxEntries() --> xmlhttpRequest that gets the total number of entries that can be retrieved</div><div>$(window).scroll(function() --> calls loadEntries()</div><div>
</div><div>I also have <body onload="setup()"></div>
<div>
</div><div>setup() --> calls getMaxEntries(), here is where I would like call loadEntries() a few times (according to the screen size)</div><div>
</div><div>The only way I could get entries to load dynamically, onPageLoad was via a loop that called loadEntries() but that gave me an unresponsive script error, which I want to avoid.</div>
<div>
</div><div>Is there any way that JQuery can help me in solving this problem?</div><div>
</div><div>Thanks,</div><div>
</div><div>Sid</div></div><br clear="all">"Veni, vidi, vici"
-----------------------------------
<a href="http://blog.sidkalra.com">http://blog.sidkalra.com</a>
<a href="http://www.sidkalra.com">http://www.sidkalra.com</a>