Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

aligning texts in chat page

Hi Katya,
I followed the link, and download ZIP file, then created a test app and:

  1. create the JS asset with this file jquery.lazyscrollloading

  2. add an HTML component and edited it with
    code
    ul /ul
    li class="lazyItem"Lazy Item1/li
    li class="lazyItem"Lazy Item2/li
    li class="lazyItem"Lazy Item3/li
    li class="lazyItem"Lazy Item4/li
    li class="lazyItem"Lazy Item5/li


    code
    3 add this on device ready event of the page
    code
    $(document).ready(function() {
    $("#lazyScrollLoading").lazyScrollLoading({
    lazyItemSelector : ".lazyItem",
    onLazyItemFirstVisible : function(e, $lazyItems, $firstVisibleLazyItems) {
    $firstVisibleLazyItems.each(function() {
    this.innerHTML = this.getAttribute("data-lazytext");
    });
    }
    });
    });
    code

    But step 3 looks that is not working, I removed this and is the same..

    What Im doing wrong? and how can I apply this code to my real APP that uses DB with data fields and links to images inside Appery DB?

    Regards/code/code/code/code

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

aligning texts in chat page

test

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

aligning texts in chat page

Hello Alex,

Please find my answer here.
This is the function from the first example on this page: http://dl.dropboxusercontent.com/u/83...
You should make corresponding html sample, to get it working.

code<li class="lazyItem" data-lazytext="Lazy Item 7">Lazy Item 7</li>/code

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

aligning texts in chat page

Hello Evgene,
I followed your aswer and still cant make it works..

this is my public link os a test app:

http://appery.io/app/mobile-frame?src...

I added the code from "usage" to page load, then tried with scroll event, but is always the same, even if remove the JS code.

Am I doing something wrong?

Regards

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

aligning texts in chat page

Hi Alex,

Run this code on Page Show event:pre$("#lazyScrollLoading")&#46;lazyScrollLoading({
lazyItemSelector : "&#46;lazyItem",
onLazyItemFirstVisible : function(e, $lazyItems, $firstVisibleLazyItems) {
$firstVisibleLazyItems&#46;each(function() {
this&#46;innerHTML = this&#46;getAttribute("data-lazytext");
});
}
});/pre
In other words, removepre$(document)&#46;ready(function() {/preand closingpre}/pre

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

aligning texts in chat page

Please confirm you've read this, forum page seems to be broken.

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

aligning texts in chat page

hello!
I ́ve read this, but still having trouble.
We can follow here:
https://getsatisfaction.com/apperyio/...

thanks

Return to “Issues”