Dose AEM support JQuery animate function? | Community
Skip to main content
October 16, 2015
Solved

Dose AEM support JQuery animate function?

  • October 16, 2015
  • 3 replies
  • 946 views

Hi there,

Please see the snippet code below:

function runProgress(id, percentage, speed, isSwitched) { $("#uploadedFileNo").show(); var wii = parseInt(percentage) / 100 * progressBarWidth; if(speed == "normal") { $("#ProgressBar" + id).animate({width : wii}, "normal", function() { var displayData = percentage + "%"; alert("displayData: " + displayData);/////// $("#bp"+ id).find(".icons").text(displayData); if (percentage == 100 && isSwitched) { queryFileProfile(id); uploadedFileNo++; $("#uploadedFileNo").html("- Uploaded: " + uploadedFileNo); } }); } else { $("#ProgressBar" + id).animate({width : wii}, 10, function() { var displayData = percentage + "%"; $("#bp"+ id).find(".icons").text(displayData); if (percentage == 100) { queryFileProfile(id); uploadedFileNo++; $("#uploadedFileNo").html("- Uploaded: " + uploadedFileNo); } }); } }

As a result i notice that animate not work at all. I suspect CQ5 if support that?

Anyone could comment on it? Thanks a lot in advance.

 

Best regards,

Brian

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mshaji

Yes, jquery works with CQ5. It is a javascript framework, fully supported by CQ5. You have have to include clientlibs (javascript ) files in your component.

OOTB has jquery files, you need to add dependencies in order for it to work.

Here is an article on how you can integrate jquery with your application

http://helpx.adobe.com/experience-manager/using/integrating-jquery-framework-cq.html

Please check whether you are following all the instructions defined in this article.

3 replies

MshajiCommunity AdvisorAccepted solution
Community Advisor
October 16, 2015

Yes, jquery works with CQ5. It is a javascript framework, fully supported by CQ5. You have have to include clientlibs (javascript ) files in your component.

OOTB has jquery files, you need to add dependencies in order for it to work.

Here is an article on how you can integrate jquery with your application

http://helpx.adobe.com/experience-manager/using/integrating-jquery-framework-cq.html

Please check whether you are following all the instructions defined in this article.

October 16, 2015

Hi Mshajiahmed,

Thanks for your reply. I check and see that article you comment. Certainly, i made sure the necessary JQuery lib was added into clientlibs before i post this question. But, just only that function

animate() always not work rather than jquery, i think it is a little weird.
Community Advisor
October 16, 2015

I think it could be some of jquery properties for animate is not set properly.

Try to debug before after and calling this function in firebug or Google dev tools.

Please check this on stack overflow as well

http://stackoverflow.com/questions/22576699/jquery-animate-not-working