Search code examples
jqueryjsontwitterquoteshtml

add quotes to tweets grabbed by json


Using Seaofcloud's Tweet jQuery plugin to inject a recent tweet into a site. Wondering how I can add some quotes around the incoming tweet. It's fetched via JSON

Here's a jsFiddle http://jsfiddle.net/danielredwood/mrgta/2/

my guess is that it's in the commented out section, specifically this chunk below

 var text = '<span class="tweet_text">'+$([tweet_text]).makeHeart().capAwesome().capEpic()[0]+ '</span>';

Not my area of expertise.. I guessed (and hoped) that &quot; wrapped around it would work... HA.

Ideas? thanks for your help.


Solution

  • If I understand the problem correctly,

    var text = '<span class="tweet_text">\"'+$([tweet_text]).makeHeart().capAwesome().capEpic()[0]+ '\"</span>'
    

    http://jsfiddle.net/mrgta/5/