javascript - Affecting only one element with jQuery toggle -


so have got code

$('.item').click(function () {     if ($(".secondary", this).is(":hidden")) {         $(".primary", this).toggle('slide', {             direction: 'right'         }, 500, function () {             $('.secondary', this).toggle('slide', {                 direction: 'left'             }, 500);         });      } }); 

current behavior when click .item, .primary slides right, .secondary doesn't slide in @ all.

fiddle: http://jsfiddle.net/zm3zp6ax/

$('.item').click(function () {     var $this = $(this);     if ($(".secondary", this).is(":hidden")) {         $(".primary", $this).toggle('slide', {             direction: 'right'         }, 500, function () {             $('.secondary', $this).toggle('slide', {                 direction: 'left'             }, 500);         });      } }); 

demo


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -