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); }); } });
Comments
Post a Comment