When you scroll with the mouse and the window reaches the end of the page is activated the Load More button automatically.
In /public_html/templates/base
_footer.html add the line
<script language="javascript" type="text/javascript" src="https://xxxxxxxxx.com/inc/js/toni.js"></script>
Add the archive toni.js in /public_html/inc/js
toni.js
$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
oWallView.changePage(20, 20)
}
});
The problem is that the timeline block should be the last one. Any idea to improve it?
I hope you like it
|
muro = 0;
$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
muro = muro + 20;
oWallView.changePage(muro, 20)
}
});
better now
|
Great stuff and should be mandantory in Dolphin!
Thanks!
Greetings
Klaus
You should palce it in the market!
|
Thx Klaus
It will work better for you by adding this:
muro = 0;
var toni = !document.getElementsByClassName("bx-btn-disabled")[0];
if (toni == true){
$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
muro = muro + 20;
oWallView.changePage(muro, 20)
}
});
}
One question, does it work on your cell phone?
|
Yes, it works on smartphones as well as on tablets.
What makes the difference to your second coding?
Greeting
Klaus
|
Avoid loading the "empty" message indefinitely in the profiles without any publication
|
In Chrome you still have the empty messages in the timeline. |
It would be interesting if the wall uploads more publications a little before reaching the end of the page so the user does not have to wait.
But I can not do it, any help?
|
|
Hi, thanks for the tip, i tried to change it a little to work with outline too and it did now work for me. can you check it in you end please?
Outline:
muro = 0;
var toni = !document.getElementsByClassName("bx-btn-disabled")[0];
if (toni == true){
$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
muro = muro + 20;
oWallOutline.changePage(muro, 20)
}
});
}
Both:
muro = 0;
var toni = !document.getElementsByClassName("bx-btn-disabled")[0];
if (toni == true){
$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
muro = muro + 20;
oWallOutline.changePage(muro, 20);
oWallView.changePage(muro, 20);
}
});
}
Always remember that the future comes one day at a time. |
With the code I put before I had problems on mobile devices. With this it works on mobiles although it could be improved.
muro = 0;
var toni = !document.getElementsByClassName("bx-btn-disabled")[0];
if (toni == true){
$(window).scroll(function(){
if ($(window).scrollTop() + $(window).height() >= $(document).height()-100){
muro = muro + 20;
oWallView.changePage(muro, 20);
}
});
}
|
Thanks for sharing. Good code. However I get EMPTY messages both on Chrome and on IE. Any idea how to fix this?
Thanks!
|
Besides the EMPTY messages, I noticed that on page load the Timeline shows only the posts from the most recent day, which could be only one or two posts. So I added the $(window).load(function() event to buensumiso's code.
If someone can advise how to get rid of the EMPTY boxes that would be great.
Thanks.
Here it is:
muro = 0; var toni = !document.getElementsByClassName("bx-btn-disabled")[0]; if (toni == true) { $(window).scroll(function(){ if ($(window).scrollTop() + $(window).height() >= $(document).height()-100){ muro = muro + 20; oWallView.changePage(muro, 20); } });
$(window).load(function(){ if (muro < 20){ muro = muro + 20; oWallView.changePage(muro, 20); } }); }
|
|