I'm using Tweet and Truncate plugin simultanously, so if the tweet it too long it gets truncated after x chars.
$().ready(function() {
$(".tweets").tweet({
join_text: "auto",
username: "dave",
avatar_size: 18,
count: 1,
auto_join_text_default: "",
loading_text: "Loading tweet..."
});
if ( $('.tweet_text')[0] ) {
alert('yay');
}
});
... so the tweet function loads the tweet, but jquery doesn't find it! Is it possible to delay the next function so it can find it?
Thanks
asked Jan 27, 2012 at 9:52
eozzy
69.4k111 gold badges288 silver badges448 bronze badges
-
Does the Tweet plugin not have a callback function you can use to grab the tweet's content?Labu– Labu2012年01月27日 09:57:03 +00:00Commented Jan 27, 2012 at 9:57
-
possible duplicate of Jquery delay on functiondavidcondrey– davidcondrey2014年07月19日 02:00:38 +00:00Commented Jul 19, 2014 at 2:00
2 Answers 2
jquery has a delay function http://api.jquery.com/delay/
answered Jan 27, 2012 at 9:52
Scott
21.9k8 gold badges46 silver badges57 bronze badges
There is a delay method in JQuery however a better solution would be to truncate in the tweet callback method.
answered Jan 27, 2012 at 9:54
Mikael Härsjö
1,0366 silver badges14 bronze badges
Comments
lang-js