Home > Developers
 
 
On-Page API
Description
The On-Page API enables you to use JavaScript to include a Take It 2GO menu for a registered Spinlets™ widget. The widget need not be embedded in the same Web page. The Take It 2GO menu enables the end user to place the widget on any of a large number of social networking, blogging, and other Web sites. The end user can also email the widget, or install it on a computer as a Yahoo! Widget.

In order to use the On-Page API, your Web page must include a DOCTYPE declaration, such as the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


You must also include the following before any calls to the On-Page API functions:

<script src="http://www.spinletslab.com/onpage/v1/detached.js" type="text/javascript"></script>

Onpage Functions
The On-Page API includes the following functions for showing the Take It 2GO button and menu:
ShowButton
Description

Displays the Take It 2GO button.

Syntax

$Onpage.ShowButton(settings)

Return Value

Menu object

ShowMenu
Description

Displays the Take It 2GO menu.

Syntax

$Onpage.ShowMenu(settings)

Return Value

Menu object

CreateMenu
Description

Creates a custom Take It 2GO menu, but does not display it. Used with custom buttons.

Syntax

$Onpage.CreateMenu(settings)

Return Value

Menu object

Settings

These settings can be used with any of the Onpage functions.

Name Type Required? Description
Sid String Yes ID of the registered Spinlets™ widget
Config JSON No Set of parameters to be passed to the widget.
includeServices Array of Strings No Set of service identifiers to include in the Take It 2GO menu. Do not use in conjunction with excludeServices setting.
excludeServices Array of Strings No Set of service identifiers to be excluded in the Take It 2GO Menu. Do not use in conjunction with includeServices setting.

Service Identifiers

These service identifier strings are to be used with the includeServices or excludeServices settings.

Service Type Service Service Identifier
Post MySpace myspace
Post Facebook facebook
Post iGoogle igoogle
Post Blogger blogger
Post BloggerSidebar bloggersidebar
Post Live.com live
Post Live Favorites livefavorites
Post Live Spaces livespaces
Post MyYahoo! yahoobookmark
Post AOL Bookmarks aolbookmarks
Post Ask Mystuff askmystuff
Post Backflip backflip
Post Del.icio.us delicious
Post Digg digg
Post Diigo diigo
Post DropJack dropjack
Post Faves faves
Post Furl furl
Post Google Bookmarks googlebookmarks
Post Linkagog linkagogo
Post Mister Wong misterwong
Post NetVibes netvibes
Post NetVine newsvine
Post Eons eons
Post Live Journal livejournal
Post Mulitply multiply
Post Perfspot perfspot
Post Pageflakes pageflakes
Post Piczo piczo
Post Propeller propeller
Post Reddit reddit
Post Segnalo segnalo
Post Simpy simpy
Post Skimbit skimbit
Post Slashbot slashdot
Post Spurl spurl
Post StumbleUpon stumbleupon
Post Technorati technorati
Post Twitter twitter
Post Typepad typepad
Post Typepad Sidebar typepadsidebar
Post Webwage webwag
Post Yahoo! Bookmarks yahoobookmarks
Desktop Yahoo! Desktop Widget yahoowidget
Send Email Email email
Get Code Javascript Code jscode
Get Code MySpace Code myspacecode
Menu Object Functions
The Menu object that is returned from the Onpage functions has the following functions:
show
Description

Shows the menu.

Syntax

object.show()

Return Value

None

hide
Description

Hides the menu.

Syntax

object.hide()

Return Value

None

toggle
Description

Toggles the menu (hides it if it is showing, shows it if it is hidden).

Syntax

object.toggle()

Return Value

None

Examples
Including a Standard Take It 2GO Menu
<script type="text/javascript">
var settings = {};
settings.sid = "00000000000000000000000000000000";
$Onpage.ShowMenu(settings);
</script>

Including a Custom Take It 2GO Button
<a id="slBtn" href="#"><img id="button-fav" src="http://example.org/
images/sl_button_share1.gif" alt="" /></a>
<script type="text/javascript">
$Onpage.CreateMenu({ sid : "00000000000000000000000000000000", actionElement : "slBtn" });
</script>
About Us | FAQs | Feedback | Contact Us | Terms of Service | Privacy Policy
© 2009. Fuhu, Inc. All Rights Reserved.