I have some problem width a scroll bar. Here is my code,
Css code :
#content-wrapper{
position: relative;
overflow-y : auto;
overflow-x : hidden;
width: 100%;
height: 100%;
}
HTML code :
<div id="content-wrapper">
<ul id="my-ul">
<li>data</li>
.
.
</ul>
</div
This work normally
But When I got new data to bind to ul as below,
$.ajax({
type : 'GET',
url : '/api/somedata',
success : function(data){
$('#my-ul').empty(); //clear old data.
_.each(data, function(myItem){
$('#my-ul').append('<li>'+myItem.name+'</li>');
});
}
});
My problem is new data that were bind to ul tag are less than the older but scrollbar did't get updated. There is a empty space in content-wrapper tag. It still remember the older height.