Replace \nAfter including this JavaScript file, we have access to the parameter ( \nNext, we need to create an HTML library. Copy and paste the following code and place it inside the \"body\" tag. <\/p>\n This is a test blog post testing @Anywhere by @twitter.<\/p>\n\t\t\t If you enjoyed this tutorial, please follow me<\/a> and keep in touch with @NETTUTS for more awesomeness.<\/p>\n\t\t<\/div>\n\t<\/div>\n\tAPIKey<\/code><\/strong> with your application's API key you obtained in the previous step. Parameter
v=1<\/code> is the version. Maybe in the future, Twitter will add new features and maybe new syntax. To prevent breaking existing @Anywhere code, they will retain the old code (if specified). Version 1 supports all major browsers, including IE6. <\/p>\n
twttr<\/code> object, which will call the
anywhere()<\/code> function with the arguments when @Anywhere is ready: <\/p>\n
\ntwttr.anywhere(function(twitter) {\n\t\/\/ Actions when @Anywhere is ready\n});\n<\/pre>\nThe
twitter<\/code> in this case) is the object we will use, similar to jQuery's
$<\/code>. <\/p>\n
\n
My blog post<\/h2>\n\t\t
Comments<\/h3>\n\t
\n\t\t- @corcholat<\/span> says:\n\t\t\t
- @faelazo<\/span> says:\n\t\t\t
Such a great tutorial! <\/p>\n\t\t<\/li>\n\t\t
You should also follow @smashingmag<\/p>\n\t\t<\/li>\n\t<\/ol>\n\t<\/div>\n<\/div>\n<\/pre>\n
Now let’s delve deeper. <\/p>\n
\n
\n1.<\/span> linkifyUsers: Convert @something to a link<\/h2>\n
\n@Anywhere allows us to convert @mentions into links. This feature is called
linkifyUsers<\/code>, and it's very simple: it sets the HTML elements you want to turn into links. <\/p>\n
\nSince we want to convert all @mentions in the document into links, we simply call the
linkifyUsers()<\/code> function in the body element: <\/p>\n