adding animation when showing a div - jQuery
,
HI,I have a div that i 开发者_Python百科create on the fly witch is dispalyed none, in the first place, then i want to show it using jquery .show(), but also have a .animate() when it shows.
Did this:
$(newDiv).show().animate({
width: "270px",
borderColor: "#4a4a4a"
},800);
But it didnt like it (firefox), it says this error:
Error: attempt to run compile-and-go script on a cleared scope
How can i make this work? by the way on chrome it works fine...
By the way this works:
$(newDiv).show('slow', { animation: 'slide' })
But i need to have my animation function.
Thank in advance.
for me it works fine , here is the example click here
精彩评论