What is making this slideToggle so choppy/unsmooth on mobile(ios)?

Can you see anything in this one that would make this choppy in IOS?

if i only have one <ul> without a container that im toggling it works just fine.

I find all the jquery animations choppy even on desktop and lately I have taken to using velocity.js which can work alonside jquery or without it.

It smooths all the animations out and uses a similar syntax to jquery so is easy to implement.

Usually it’s the margins on the animated element that make the animations in jquery even choppier but that doesn’t seem to be the case in your example.

Seems nice, do you know if velocity have som equivalent to slideToggle in jQuery?

You would need to toggle something like this:

 if ($(elTarget).is(':visible') ) {
    	  $(elTarget).velocity("slideUp", function() { duration: 1500 }); 
     } else {
    	$(elTarget).velocity("slideDown", function() { duration: 1500 }); 		 

where elTarget is the element concerned.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.