I have a page which contains a list. I have a button to add a new item to the list. I want to apply JQuery-UI effect to the adding of new item, my problem is when the effect animation is shown, the list item is not styled. See this fiddle – http://jsfiddle.net/Ec3x9/2/.
You can see that when the user clicks on the create button, the animation of the item is displayed, but the list item text is under the icon since the CSS is not applied. I want to show the animation of the list item. How do i do that?
Remove the
>character betweenulandliin your CSS declarations. What jquery does is wrap yourliwith adivelement before it does the animations. When that happens, theliisn’t a direct descendent ofulanymore so your styles aren’t being applied during the animation.Ex: http://jsfiddle.net/Ec3x9/8/