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:
But I would like it to make it open like this:
Can this be done?
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:
But I would like it to make it open like this:
Can this be done?
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
Try this:
$('.Show').animate({ width: <yourWidth> }, 600)
$('.Hide').animate({ width: 0 }, 600)