Run script after repeater is done

I have a repeater setup and i the container height is limited in order to make it scroll-able. I am using Nicescroll Javascript to customize the scroll bar. However the script loads before the repeat is done filling the container and it cannot ‘see’ it.

I put the script at end of page but still.

Does the repeat have an ondone or similar?

Hey Johnny,

Try putting your script inside this.

$( document ).ready(function() {
    // your script here
});

Ah thats a document ready i’ll try, i think i did already.

I am using a Content Page by the way too.

If it doesn’t work you can use the success event of a server connect to call a function, or set a function to execute with a timeout.

yupp worked with the success event. and i swear i had tried it. Or was it On Done. don’t know the difference btw.

works now thanks!

1 Like

I think we have a complete dynamic event on the repeater, check the events there.

1 Like

Ok i’ll try because the above didn’t work actually, i even tried a series of variable that calculate IF Last record then update another Var and then Run script on value updated. It SHOULD have worked but didn’t. I’ll keep at it.

Pasting the code in browser console runs and styles the scroll bar just fine.
$("#nicescroll").niceScroll({cursoropacitymin: 0, autohidemode: false});