reverse the direction of the jquery UI fold effect
HTML
<br><br><br><br><br><br>
<div id='settings_wrapper'>
<button id='button_settings1'>btn1</button>
..............................................
<button id='button_settings2'>btn2</button>
<div id='hover_settings'>
Settings
</div>
</div>
CSS
#settings_wrapper{
position:relative;
background: aliceblue;
display:inline-block;
}
#hover_settings{
position: absolute;
/*right: -20em;
top: -6em;*/
background: antiquewhite;
border-radius: 20px;
border: 2px solid #ccc;
width: 10em;
height: 5em;
text-align: center;
display: none;
/*left: 1.4em;*/
/*bottom: 3em;*/
}
JavaScript
$(function() {
function t(){
$('#hover_settings')
.toggle({effect: "fold", horizFirst: false, direction: 'right'}, 500);
}
$('#button_settings1').click(function(){
$('#hover_settings')
.css('left','1.4em')
.css('bottom','3em')
.css('right','initial')
.css('top','initial')
t();
});
$('#button_settings2').click(function(){
$('#hover_settings')
.css('right','2em')
.css('top','2em')
.css('left','initial')
.css('bottom','initial')
t();
});
});