Tweet.js-Mod icon indicating copy to clipboard operation
Tweet.js-Mod copied to clipboard

Ticker Function

Open wtadesign opened this issue 11 years ago • 13 comments

Hi Stan

Thanks for your mod script, I got this to work on my site, but the ticker functions I had working with the original tweet.js script, do not work with your updated script.

1.Ticker Function

Can you help with this getting the above functions to work again with your mod script?

Thanks Stan

Cheers Van

My js code in the twitter page

wtadesign avatar Jun 06 '13 05:06 wtadesign

+1 for wtadesign

your script worked great! very good job. if the ticker could also work it would have been perfect!

COPY/PASTE SECTION FROM TWEET.SEAOFCLOUDS.COM #11:

#11 - display one tweet at a time like a ticker: jQuery(function($){ $("#ticker").tweet({ username: "seaofclouds", page: 1, avatar_size: 32, count: 20, loading_text: "loading ..." }).bind("loaded", function() { var ul = $(this).find(".tweet_list"); var ticker = function() { setTimeout(function() { var top = ul.position().top; var h = ul.height(); var incr = (h / ul.children().length); var newTop = top - incr; if (h + newTop <= 0) newTop = 0; ul.animate( {top: newTop}, 500 ); ticker(); }, 5000); }; ticker(); }); });

Again, thank you!

berdesos avatar Jun 12 '13 10:06 berdesos

I too have lost my tickers from V1. I'm truly a novice at scripting and can't seem to find a solution for this anywhere. It's only showing the last tweet. Any help is appreciated! thank you!

zgirltoo avatar Jun 12 '13 22:06 zgirltoo

I separated the ticker function and have it load on document.ready. Ticker is working for me now.

jQuery(function($){ $(".hjtweet").tweet({ username: "harryjoshhair", page: 1, avatar_size: 48, count: 20, loading_text: "loading ..." }) });

$(document).ready(function() {
var ul = $(this).find(".tweet_list"); var ticker = function() { setTimeout(function() { var top = ul.position().top; var h = ul.height(); var incr = (h / ul.children().length); var newTop = top - incr; if (h + newTop <= 0) newTop = 0; ul.animate( {top: newTop}, 500 ); ticker(); }, 7000); }; ticker(); });

visufish avatar Jun 12 '13 22:06 visufish

Re: visufish

Thats great, thanks for working that out (works great now). I just added a // $('#ticker a').attr('target','_blank'); // to it, to force the links to open a new window.

thank you.

jQuery(function($){ $(".hjtweet").tweet({ username: "harryjoshhair", page: 1, avatar_size: 48, count: 20, loading_text: "loading ..." }) });

$(document).ready(function() {

var ul = $(this).find(".tweet_list"); var ticker = function() { setTimeout(function() { var top = ul.position().top; var h = ul.height(); var incr = (h / ul.children().length); var newTop = top - incr; if (h + newTop <= 0) newTop = 0; ul.animate( {top: newTop}, 500 ); ticker(); }, 7000); }; ticker(); $('#ticker a').attr('target','_blank'); });

wtadesign avatar Jun 13 '13 00:06 wtadesign

Well done visufish and wtadesign. It works for me too!!!

berdesos avatar Jun 13 '13 08:06 berdesos

Fantastic news that it is working for you! I am still struggling and not sure where to go from here. This is a test page displaying what I have and am grateful for any help or guidance!

(URL removed)

I'm using the modified jquery.tweet.js and your code above but it's still displaying the latest tweet only. It doesn't seem to be loading anything into #ticker so maybe the html is wrong?

Thank you again for any help!

zgirltoo avatar Jun 13 '13 19:06 zgirltoo

try putting this nearer to the end of the closing body tag, your current order of scripts might have a conflict with your easy easySlider Js.

wtadesign avatar Jun 14 '13 00:06 wtadesign

I went back and modified the script I had before by using load on ready function and voila! It works again. Thanks again for your help!

zgirltoo avatar Jun 14 '13 13:06 zgirltoo

I've tried but can't see anything

if i use other examples it's work only the ticker not

you can find my source on

http://pastebin.com/xNygM8EG

helmuteke avatar Jun 14 '13 18:06 helmuteke

Att: helmuteke Pleas check your path for src="./twitter/jquery.tweet.js I think it would be ../ if that is one folder up from your current twitter index page. and make sure that the "twitter" folder is in your root directory, not in a sub folder.

Have a look at http://pastebin.com/DbaW3tu2

wtadesign avatar Jun 15 '13 08:06 wtadesign

Att: wtadesign

If i place you pastebin in index.html at root and twitter folder also

it doesn't work the ticker

helmuteke avatar Jun 15 '13 09:06 helmuteke

Try making your ".hjtweet" to " #ticker"

and then copying these items

/* -- css ticker tweet version */

#ticker { height:26em; overflow-y: hidden; position: relative; padding: 0px 8px 10px 8px; margin: 0 0 3px 0;

  }

  #ticker ul.tweet_list {
    position: absolute;
  }
  #ticker ul.tweet_list li {
    height: 100%;

}

/* -- div id for ticker in your html page */

/* -- js include and function to go at the bottom of you html before

*/

wtadesign avatar Jun 15 '13 09:06 wtadesign

now it works , tnx a lot

helmuteke avatar Jun 15 '13 09:06 helmuteke