6 Replies Latest reply: Aug 3, 2012 11:07 AM by Nancy O. RSS

    (jQuery) Modifying slideUp & slideDown to slide left and right...

    jyeager11 Community Member

      From the tutorial :
      http://www.randomsnippets.com/2011/04/10/how-to-hide-show-or-toggle-your-div-with-jquery/

       

      function slideonlyone(thechosenone) {

           $('.newboxes2').each(function(index) {

                if ($(this).attr("id") == thechosenone) {

                     $(this).slideDown(200);

                }

                else {

                     $(this).slideUp(600);

                }

           });

      }

       

      This slides down (in) and up (out).

       

      I'd like to slide left/right instead.

       

      I'm assuming I'd have to use "animate" to pull this off.

       

      Anyone know what the proper syntax would be?