View Full Version : Adding scroll ability in script
Midori
09-03-2016, 07:50 AM
Hi
How can i adding scroll in:
http://www.dynamicdrive.com/dynamicindex17/rsstickerajax/index.htm ?
jscheuer1
09-03-2016, 02:41 PM
This is basically the same script and it already scrolls:
http://www.dynamicdrive.com/dynamicindex17/rsspausescroller/index.htm
Midori
09-04-2016, 08:36 AM
This is basically the same script and it already scrolls:
http://www.dynamicdrive.com/dynamicindex17/rsspausescroller/index.htm
Thanks sir . I used MyBB plugin (https://community.mybb.com/thread-60466.html) That in this plugin use http://www.dynamicdrive.com/dynamicindex17/rsstickerajax/index.htm script and I cant change plugin but if possible I want to adding scroll in that script . Could you please advise me?
jscheuer1
09-04-2016, 09:02 PM
As Daffy Duck might remark, "Why didn't you say so in the first place!" (add sibilant s's for full effect ;)). Anyways, probably. I downloaded the plugin and the script it contains isn't even the same as the original. Close though. In a mock up I'm already close to scrolling it. But, since you've already given incomplete information, it would be nice to know how you want it to scroll. From the bottom up (probably easiest), or from left to right, something else? Also, I'm pretty sure it will need some tweaking in css and/or in the script once I get it doing whatever it is you want it to so that it can also look clean. To that end - I would like to see what you currently have. Can you post a link to the current implementation?
Midori
09-05-2016, 09:05 AM
As Daffy Duck might remark, "Why didn't you say so in the first place!" (add sibilant s's for full effect ;)). Anyways, probably. I downloaded the plugin and the script it contains isn't even the same as the original. Close though. In a mock up I'm already close to scrolling it. But, since you've already given incomplete information, it would be nice to know how you want it to scroll. From the bottom up (probably easiest), or from left to right, something else? Also, I'm pretty sure it will need some tweaking in css and/or in the script once I get it doing whatever it is you want it to so that it can also look clean. To that end - I would like to see what you currently have. Can you post a link to the current implementation?
Could you please advise me how can i set to scroll From the bottom up . My website is in persian language (I think is difficult to read for you:rolleyes::)). In top of page and After "eyeblink.gif" I inserted plugin code and changing my web RSS news normally.
http://www.midorinco.ir/index.php
screen shot:5938
jscheuer1
09-05-2016, 03:37 PM
I don't need to understand Persian, I read code and I can see the layout. I worked on this some more and got it scrolling. I'll have a look at what you have and see if I think it will fit or, if not, how to make it work. From your image, it looks promising.
jscheuer1
09-05-2016, 04:26 PM
OK, might need a little tweaking, but should work (tested it here) so I'm just concerned about the layout. I copied your version of the script and I think I preserved its encoding (UTF-8 without the BOM) and Persian language changes. Keep a copy of the current version though just in case. Here's the replacement (right click and save as):
5939
Midori
09-05-2016, 08:15 PM
OK, might need a little tweaking, but should work (tested it here) so I'm just concerned about the layout. I copied your version of the script and I think I preserved its encoding (UTF-8 without the BOM) and Persian language changes. Keep a copy of the current version though just in case. Here's the replacement (right click and save as):
Thank you very much Sir. Its work very nice for me now. :o:o
I just added "vertical-align:middle;" in line:20 for more fixing words place. Thanks again for helping me . Your faithful .:o
jscheuer1
09-05-2016, 08:31 PM
OK, good! Looks like it goes a little too far and then snaps back. That's here (line 60):
if(div.scrollTop === 20){
Might be better with 17 or 18 there, maybe 16.
A better solution would be to have the script calculate that, so line 60 could be changed to:
if(div.scrollTop >= div.getElementsByTagName('div')[0].offsetHeight){
Works here.
I've got an idea for a further refinement. Setting the height of the container by the height of the first item - also works here. So, if the above (letting the script calculate the scroll) doesn't work out, adding that refinement (add after line 51):
if(this.pointer === 1){tickerDiv.style.height = tickerDiv.getElementsByTagName('div')[0].offsetHeight + 'px';}
will likely make it work.
If you like, I can upload the new version so you don't have to edit what you have.
Midori
09-06-2016, 05:46 AM
OK, good! Looks like it goes a little too far and then snaps back. That's here (line 60):
if(div.scrollTop === 20){
Might be better with 17 or 18 there, maybe 16.
A better solution would be to have the script calculate that, so line 60 could be changed to:
if(div.scrollTop >= div.getElementsByTagName('div')[0].offsetHeight){
Works here.
I've got an idea for a further refinement. Setting the height of the container by the height of the first item - also works here. So, if the above (letting the script calculate the scroll) doesn't work out, adding that refinement (add after line 51):
if(this.pointer === 1){tickerDiv.style.height = tickerDiv.getElementsByTagName('div')[0].offsetHeight + 'px';}
will likely make it work.
If you like, I can upload the new version so you don't have to edit what you have.
Thanks Sir.
I changed codes. Now it works very nice and better and perfect. I love your codes and thanks again for advising . your faithfully :o:o:o
-----------------------
And in last:
I just added (style="height:20px") in line:53 and height of letters are ok now. Thanks again . :o:o
jscheuer1
09-06-2016, 02:27 PM
Just keeps getting better.
Guess you have more deep descender letters so you need more height for them. I'm thinking that since you went ahead and set everything to 20px you could probably take away my changes and it would be fine, but it seems to work OK with them as well. One thing I see here, looks like vertical-align: top; actually will make it line up better. I know middle makes more sense, but often (when used on something other than a td element) this property affects the surrounding element's position more than it's own content.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.