0

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
2
  • Does the Tweet plugin not have a callback function you can use to grab the tweet's content? Commented Jan 27, 2012 at 9:57
  • possible duplicate of Jquery delay on function Commented Jul 19, 2014 at 2:00

2 Answers 2

1

jquery has a delay function http://api.jquery.com/delay/

answered Jan 27, 2012 at 9:52
Sign up to request clarification or add additional context in comments.

2 Comments

the delay function does work. Perhaps you should show what you tried.
how should I use? can you please update the JS posted in the description? thanks!
0

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

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.