Rich-text Reply

Is .animate() not compatible with Optimizely jquery version?

swaty 02-19-15

Is .animate() not compatible with Optimizely jquery version?

Hi,

 

I am trying to setup an experiment which involves few animations, but I am unable to make .animate() work with Optimizely.

Is there any other animate method that we can use instead of .animate() or is there any way to make this method work?

 

Thanks,

Swaty

Level 1

Joel_Balmer 02-20-15
 

Re: Is .animate() not compatible with Optimizely jquery version?

Hi Swaty!

 

Here's a handy snippet of code you might find useful:

 

l = Object.getPrototypeOf(optimizely.$("body"))
var optimizely_functions = []
for(var g in l){
  optimizely_functions.push(g)
}
console.log(optimizely_functions)

If you fun this on a page with the Optimizely snippet on, then this will print out the functions that are included. Note, this is useful if the snippet includes the trimmed version of jQuery. For how to set this, see this article, here.

 

If the funciton you wish to use is not included, feel free to change your jQuery settings to include full jQuery in the snippet, or the recommended approach, use the native jQuery on your site (if you have jQuery installed already on your site).

 

When I run this, I see that animate() is not included in the trimmed version.

 

I hope that information is useful!