Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Slider Effect

Tags:

jquery

I am using jQuery for a slider effect on button click. My code is:

$(document).ready(function() {

  $("#mybutton").click(function () { 
      $("#slidemarginleft").hide("slide", { direction: "down" }, 1000);
});
});

When I click on the button, a JavaScript error occurs:

f.easing[e.animatedProperties[this.prop]] is not a function
like image 758
Durga Dutt Avatar asked May 14 '11 04:05

Durga Dutt


People also ask

What is jQuery slider?

jQuery UI slider is used to obtain a numeric value within a certain range. The main advantage of slider over text input is that it becomes impossible for the users to enter an invalid value. Every value they can pick with the slider is valid.

How does jQuery sliding work?

JQuery supports three sliding methods that are slideUp(), slideDown(), and slideToggle(). The slideUp() or slideDown() methods slide the elements in upward or downward directions respectively. Alternatively, the slideToggle() method determines whether the element is in the slideUp() state or in slideDown().

What is jQuery image slider?

jQuery skdslider is a lightweight and easy-to-use jQuery plugin that allows you to create a responsive and full-width image slider with auto-play, dots/number navigation and fade animation support.

Is WOWSlider free?

WOWSlider is free for non-commercial use.


1 Answers

The code snippet he provided is straight out of the jQuery UI documentation:

$("div").click(function () {
  $(this).hide("slide", { direction: "down" }, 1000);
});

I just got this error and the issue was that the jQuery UI script wasn't loaded (D'oh!). jQuery UI is required for the easing animations.

Try adding this to see if it resolves the problem:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js"></script>       
like image 119
Justin Searls Avatar answered Nov 15 '22 06:11

Justin Searls