Reputation: 151
I already posted a question focused on this problem, but nobody answered. So this is actually a re-post to get the attention back.
My old post can be found here: Link
My JS Code:
$(document).ready(function() {
$('.con').load('views/startseite.html',function(){
$('.scroll').jScrollPane();
});
$('nav a').click(function(e) {
e.preventDefault()
var inc = $(this).attr('href').split('/').pop().split(".").shift(),
href = "views/" + inc + ".html"
$('.con').hide().load(href, function(){
$('.con').fadeIn('fast',function(){$('.scroll').jScrollPane();});
})
document.title = 'Robert-Richter.com | ' + firstToUpperCase(inc)
location.hash = inc
return false;
});
function firstToUpperCase( str ) {
return str.substr(0, 1).toUpperCase() + str.substr(1);
}
});
My CSS of the scrollbox:
.scroll {
position: relative;
right: 0;
width: 415px;
height: 422px;
overflow: auto;
}
Live exampe of the page with my current code: Link
I dont know why some guys always want to read a question, but here we go: Can you please help me with this?
Upvotes: 0
Views: 533
Reputation: 11
In my case I had to use autoReinitialise parameter:
$('.scroll-pane').jScrollPane({
showArrows: false,
autoReinitialise: true
});
Then I had 1 more problem - I used max-height in my scroll container - this was causing issues as each reinitialisation was setting height one more time, eventualy I just set up fixed height.
Upvotes: 0
Reputation: 109
Just replied to your old question here:
https://stackoverflow.com/a/19440317/1005460
Let me know in case it helps.
Upvotes: 0
Reputation: 513
Sometimes jquery causes the problem. Please make sure you're not using the 1.8 version (1.7 for example works fine for me). I don't know the exact problem of drupal with jquery 1.8 or higher but it's difficult to find the defect since the browser and drupal log messages aren't showing some error logs. I think it's because jquery is existing but drupal isn't able to handle it the correct way.
Upvotes: 1