Toggle multiple elements.
Guys;
I have multiple DIV's that I'm I'd like to toggle with both classes as specified in the function below but it switches just between 2 of the DIV's only and never get to the others. Any ideas of what the problem could be.
- <script>
- $.fn.slideFadeToggle = function(speed, easing, callback) {
- return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);
- };
- $(document).ready(function(){
- $("div.faces:not(:first)").hide();
- $(".lefter,.righter").click(function(){
- $(this).siblings("div.faces").slideFadeToggle('slow');
- });
- });
- </script>