0
   

Off a div when click another div

 
 
Reply Mon 28 Apr, 2014 11:56 pm
My JS code:

<div class="out">
<div class="content"> <a>click here to learn more..</a>
</div>
</div>
<div class="out">
<div class="content"> <a>click here to learn more..</a>
</div>
</div>
$(".out").click(function(){
$(".content",this).stop().animate({
left:'292px',
});
});

Here "content" is in "out" div. When I click on "out" then the css of "content" becomes left : 292px.

Now I want when I click on next "out" div then the previes div "content" will be left : 0 (left zero) like

$(".pic_boxes").click(function(){
$(".pic_box_content",this).stop().animate({
left:0,
});
});

How I can do it?
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 419 • Replies: 0
No top replies

 
 

Related Topics

 
  1. Forums
  2. » Off a div when click another div
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/16/2024 at 11:26:01