Home › Forums › JavaScript › iMDb – Personal Movies Database webapp – test drive › Re: iMDb – Personal Movies Database webapp – test drive
Hello guys, I am not very experienced with javascript this is my first project on this scripting language and its completly experimental and for personal use but as I have mentioned before if anyone want to use any part of the code he is free to do it. @CrocoDillon has helped a lot with this code!
@markomarkogame thanks for pointing out this bug, I am wokring on it… I am currently rebuilding the entire code in order to work better with search and filters. I have no idea about wordpress but I guess should be few wordpress plugings for doing just that. If you know how to build a plugin for wordpress the idea behide the “load more as you scroll” is quite simple.
@BenWalker thanks for pointing out the spelling mistake. I think that I answeredyour question about the purpose of this webapp above.
@CrocoDillon thanks one more time for your help, I tried to get rid the $(this).children('.cover').children().length === 0 )
but for some reason it was not working very well, propably I was not using the startfrom
var properly. You are right, I dont like the names either but it was late and I wanting just to test it and get some sleep. Also I am trying to detect when you scroll down or up, and trigger the loadCovers function only when is down or even record in a var the lowest position in the case you go down – up and down again.
Letter this evening (london time) I am gonna update the webapp on the same link http://cparliaros.com/imdb
EDIT:
here is the function which detects when you scroll lower than the last lowerst position and only then it will call the function with the loop.
var lastLowestTop = 0;
$('#main-container').scroll(function(){
var scrollPos = $(this).scrollTop();
if (scrollPos > lastLowestTop){
lastLowestTop = scrollPos;
loadCovers();
}
});