I want to make a text box or an area on my website, and I have about 9 buttons on the page which I don't want to redirect to other pages and open on the same page and in the same Text Box or Area that I create.
So, if someone clicks on Button 1, then opens Text 1 and its picture(s) with fades in animation, and when clicks on Button 2, Text 1 Box fades out and Text 2 with picture(s) fades in and etc. How can I do this?
I have tried some codes like this
$('.one').hide();
$('.two').hide();
$('.three').hide();
$('.btn1').click(function () {
$('.one').fadeIn();
});
$('.btn2').click(function () {
$('.one').fadeOut();
$('.two').fadeIn();
});
$('.btn3').click(function () {
$('.two').fadeOut();
$('.three').fadeIn();
});
but when clicking the buttons, the Buttons' position is not fixed and moves with the text animation.
Is there any way to do the same with other codes?