I have been experimenting with jscrollpane.
I'm trying to add some ajax content to the pane and have got it rendering content, but the reinitialisation fails for some reason.
I believe I'm following what's explained here, but perhaps I'm having issues with the vk template I use to handle my json data.
I have this div sitting already on the page.
<div id="INTERNAL-line_item_detail" class="fl scroll-pane">
</div>
It is empty when things start, but if I put some lorem ipsum in, I can see that the jscrollpane is working properly, at least at first.
Then I make this ajax request to get a json object Then use the vktemplate to put it into html.
$.ajax({
type: "POST",
url: "queries/INTERNAL_get_order_info.php",
data: "num=" + num,
dataType: "json",
success: function (data) {
//some of this is not exactly the way it is SO question I referenced
//I've been moving things around quite experimentally
api = $("#INTERNAL-line_item_detail").data('jsp');
$("#INTERNAL-line_item_detail").empty();
$('#INTERNAL-line_item_detail').vkTemplate('templates/get_line_items_template.tmpl?<?=time()?>', data, function () {
api.reinitialise();
});
}
});
CSS for the scroll-pane..nothing out of the ordinary.
.scroll-pane {
width: 350px;
height: 200px;
overflow: auto;
margin:15px 30px 15px 30px;
background-color:#fff;
}
But whenever I look at the scrollpane in the chrome inspector, it has the property overflow:hidden
added to it (though I cannot figure out from where). And I don't suppose it really matters, because when I turn it off or change it to scroll
, I only see normal-mac-scrollbars on top and bottom.
Any ideas? Many thanks!