Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Jackie Jen2,723 Points
Doing seach function on auto scroll load feature like facebook
I have done the auto scroll load feature like facebook. I fixed it, everytime when i scroll to the bottom it will auto load another 4 data row from my database and display on in HTML. By the way i also want to do a search feature.
For search feature, i'm using jcfilter (https://github.com/jaschahal/jcTextHighlighterFilter/tree/master/jcFilter/jquery) which is search the same wordings. Now the problems come, if i did not scroll to bottom it won't load extra 4 rows of data. that mean my search feature only search for the 1st 4 data that display. Is there any idea on the search feature? Let said total have 12 data, but at the very 1st it only display 4 data. when i search for similiar words, the search features will go through all the 12 data and filter out the data that have similiar word.
if not the search feature i currently done is useless.
Dylan Shine17,565 Points
What sort of backend are you working with?
In the event you are working with a backend and you need to dynamically create content on your page from your backend (i.e. facebook notifications) then I would suggest you use a mix of AJAX and jQuery UI to make that possible. If the content is already existing, and you want to hide it until your user scrolls to a certain point of the page, I would suggest you just look into the jQuery UI library for the given effect you want.
Hope that helps, Dylan