Closed link82 closed 11 years ago
solved by waiting the onSuccess callback from the script
$('#facebook-stream').socialist({
networks: [
{name:'facebook',id:'supermegapage'}
],
isotope:false,
random:false,
fields:['source','heading','text','date'],
maxResults:10,
headingLength:150,
onSuccess:function(){
//customize scrollbars
$('#facebook-stream').mCustomScrollbar();
},
onFailure:function(){
console.log('unable to retrieve social data');
}
});
Hello, I'm trying to use your script in combination with mCustomScrollbar but I'm stuck because I need to load it after the DOM elements has been added for my stream.
I tried to add a callback function to your script but I'm not sure where I should put the method call, even if I call it after completing the processes queue the other script doesn't find any element inside my div so it doesn't work. It works only if I try using a setTimeout to make it wait for a couple of seconds.
Here is where I'm trying to call my callback method