Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Adding scroll ability in script

  1. #1
    Join Date
    Sep 2014
    Location
    Iran
    Posts
    10
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Adding scroll ability in script


  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This is basically the same script and it already scrolls:

    http://www.dynamicdrive.com/dynamici...ller/index.htm
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Midori (09-05-2016)

  4. #3
    Join Date
    Sep 2014
    Location
    Iran
    Posts
    10
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    This is basically the same script and it already scrolls:

    http://www.dynamicdrive.com/dynamici...ller/index.htm
    Thanks sir . I used MyBB plugin (https://community.mybb.com/thread-60466.html) That in this plugin use http://www.dynamicdrive.com/dynamici...ajax/index.htm script and I cant change plugin but if possible I want to adding scroll in that script . Could you please advise me?

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Midori (09-05-2016)

  7. #5
    Join Date
    Sep 2014
    Location
    Iran
    Posts
    10
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    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). 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:Click image for larger version. 

Name:	2016-09-05_132435.jpg 
Views:	83 
Size:	21.2 KB 
ID:	5938

  8. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Midori (09-05-2016)

  10. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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):

    rssticker.js
    Last edited by jscheuer1; 09-05-2016 at 04:39 PM. Reason: detail
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  11. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Midori (09-05-2016)

  12. #8
    Join Date
    Sep 2014
    Location
    Iran
    Posts
    10
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    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.
    I just added "vertical-align:middle;" in line:20 for more fixing words place. Thanks again for helping me . Your faithful .

  13. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    OK, good! Looks like it goes a little too far and then snaps back. That's here (line 60):

    Code:
    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:

    Code:
    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):

    Code:
    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.
    Last edited by jscheuer1; 09-06-2016 at 01:45 AM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  14. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Midori (09-06-2016)

  15. #10
    Join Date
    Sep 2014
    Location
    Iran
    Posts
    10
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    OK, good! Looks like it goes a little too far and then snaps back. That's here (line 60):

    Code:
    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:

    Code:
    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):

    Code:
    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
    -----------------------
    And in last:
    I just added (style="height:20px") in line:53 and height of letters are ok now. Thanks again .
    Last edited by Midori; 09-07-2016 at 05:44 AM.

Similar Threads

  1. Help in Creating Custom Ability Tree for your site.
    By Przemo0c in forum JavaScript
    Replies: 6
    Last Post: 07-25-2015, 06:00 PM
  2. Stop the ability for viewers to make pics bigger
    By JudeB in forum Looking for such a script or service
    Replies: 1
    Last Post: 05-08-2011, 11:23 PM
  3. Font needs sizing ability
    By DAnna63 in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 05-22-2010, 10:10 PM
  4. Pop up image with print ability
    By Defender90 in forum HTML
    Replies: 3
    Last Post: 07-09-2008, 01:22 PM
  5. Ability to disable DynamicDrive.com's Custom Scrollbar
    By InterOrion in forum JavaScript
    Replies: 3
    Last Post: 08-02-2005, 02:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •