0

I have this function:

$('.Show').click(function() {
    $('#mobile-nb-c').show(500);
    $('.Show').hide(500);
    $('.Hide').show(500);
});

This function opens my div like this: show/hide img1

But I would like it to make it open like this: show/hide img2

Can this be done?

George
  • 6,630
  • 2
  • 29
  • 36
Mix911
  • 55
  • 5

2 Answers2

2

show() and hide() both do not have any animation properties related to them. They will just hide an element or show it. You can use .animate() for using all sorts of animations

ellipsis
  • 12,049
  • 2
  • 17
  • 33
0

Try this:

$('.Show').animate({ width: <yourWidth> }, 600)
$('.Hide').animate({ width: 0 }, 600)
Paul Losev
  • 969
  • 1
  • 12
  • 17