Currently, I am working on developing a select state using two divs that are stacked on top of each other. One div is positioned relatively while the other is positioned absolutely with a bottom position set to -200px. When the relative div is clicked, the absolutely positioned div slides in displaying a "success" message.
Although this functionality is already implemented, I am looking to enhance it by removing the "success" div if the user changes their selection. Additionally, at the moment, clicking one div triggers all the divs to show the "success" state simultaneously. I am seeking a solution to rectify this issue without making any modifications to the html or css code.
You can find the JS fiddle for reference here: http://jsfiddle.net/LSan3/
$(document).ready(function(){
$('.main-div').click(function(){
$('.inner-div').animate({
bottom: "0px"
}, 300 );
});
});
Thank you!