title: How to Define 'onSlide' Callback Function of Primefaces Slider Component?
body: <p>I have a primefaces slider component</p>
  
  <pre><code>&lt;h:inputHidden id="animhidden"/&gt;
  &lt;p:slider widgetVar="animslide" onSlide="slideAnimation()" for="animhidden" /&gt;
  </code></pre>
  
  <p>I define <code>slideAnimation</code> function, it is being called when I move the slider. But when I get the current value with <code>PF('animslide').getValue()</code> or <code>$('#animhidden').val()</code>, they get the previous value, not the new value of the slider.</p>
  
  <p>So, How should I define <code>slideAnimation</code> function and get the new value of the slider wiht javascript?</p>