8000 Type:Ticker · pvande/Tranquil Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Pieter van de Bruggen edited this page Jun 27, 2012 · 3 revisions

See This Example

    {
      "type": "ticker",
      "url": "/jsonp?url=https://raw.github.com/gist/e6a5ede46de95a7e2855/ticker-data.json&callback=?",
    }

Keys

  • url

    The URL to fetch JSONP data from. The name of the JSONP callback function should be represented as a ?, and should be the last query parameter.

  • data

    A Javascript object containing an example of the data being consumed by the widget. This will be used as a stand-in for data from the URL before the initial load, and can be used as a substitute for the URL's data (e.g. for development).

  • interval

    The time to wait before polling url for data updates, in milliseconds. Defaults to one minute.

  • filter

    The name of (or path to) a Javascript function. The named function will be invoked with each JSON object requested, and its return value will be used as the widget's data source. Defaults to the identity function.

  • speed

    The amount of time (in ms) between scroller ticks. Defaults to 25.

  • template

    A Javascript object containing Mustache templates to be used as partials.

    • element

      Used to render each element of the ticker. Defaults to '<span>{{.}}</span>'.

Data

Default (Expected)

    [
      "Element #1",
      "Element #2",
      ...
      "Element #n"
    ]
Clone this wiki locally
0