does anyone have any idea why this function is not working in Jquery?
$('.left').show("slide", { direction: "left" }, 1000);
I am trying to create a button that expands a container and shows a div when clicked. http://jsfiddle开发者_StackOverflow社区.net/pufamuf/wXyDq/14/ Thanks a lot everyone! :)
AFAIK, the easing effect you are using is only available in JQuery UI, or as a separate download, so you need to add a reference to that as well. Then the animation works.
EDIT: Looks like that's the problem:
"The only easing implementations in the jQuery library are the default, called swing, and one that progresses at a constant pace, called linear. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite." http://api.jquery.com/animate/
HTH.
I think you have got the syntax wrong for show function. You should probably use
$('.left').show();
It cannot be used with "slide", like the way you tried. Read the manual.
http://api.jquery.com/show/
精彩评论