Click here to Skip to main content
15,921,279 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to slide toggle a div right to left in asp.net
Posted
Comments
karthik Udhayakumar 19-Apr-14 1:22am    
pls explain with the code,what have you tried so far, to guide you better:)
MAGuru 19-Apr-14 1:25am    
$("#btnSubmitVendor").click(function () {
$(".vendordetails").animate({ height: 'toggle' });
$(".vendordetails").slideDown();

});

this is the code for slide down....then how to make it from left to right
karthik Udhayakumar 19-Apr-14 1:34am    
Hello Guru,
pls refer the following article
http://stackoverflow.com/questions/14823305/slide-div-left-right-using-jquery
All the best:)

Try this:
<html>
<head>
<title>the title</title>
   <script type="text/javascript" 
   src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
   <script type="text/javascript" 
   src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
   <script type="text/javascript" language="javascript">
   
    $(document).ready(function() {

      $("#toggle").click(function(){
         $(".target").toggle( "slide", 
                     { direction: "left"  }, 'slow' );
      });


   });
   </script>
   <style>
     div{ width:100px; 
            height:100px; 
            background:blue;  
        }
  </style>
</head>
<body>

   <button id="toggle">Toggle</button>
  
   <div class="target">
   </div>
  
</body>
</html>
 
Share this answer
 
v2
JavaScript
$(function() {
$("#btnright").click(function() {
$('#slidediv').toggle('slide', { direction: 'right' }, 700);
});
$("#btnleft").click(function() {
$('#slidediv').toggle('slide', { direction: 'left' }, 700);
});
});




For more details check out here : Slide Right/Left Toggle
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900