This is my jQuery:
$(document).ready(function(){
$('#mycarousel').jflickrfeed({
limit: 14,
qstrings: {
id: '26339121@N07'
},
itemTemplate: '<li><a href="{{image_b}}"><img src="{{image_m}}" alt="{{title}}" width="155" /></a></li>'
});
alert("msg");
$('#mycarousel').jcarousel({
auto: 3,
scroll: 1,
wrap: 'last',
animation: 800,
initCallback: mycarousel_initCallback
});
});
But if I remove “alert(“msg”);” this code doesn’t work properly … Somebody can help me with this issue ?
Thanks !!!!!!!!
Well, you don’t provide any explanation about what
jflickrfeeddoes, but the magic words:tells me that you have an issue with asynchronous code. I’m guessing
jflickrfeedreturns asynchronously.What that means is that the function returns control to your script before it’s finished what you asked it to do. In a Javascript program this generally means that a call to a server has been made. Such asynchronous code usually includes the option to define a handler, that is, a function that is call once the asynchronous task is complete.
If you have code that is dependent upon the completion of the asynchronous task, it should be put into the handler, not directly after the asynchronous function call.