embedScores

Shows a scoreboard list of current games within your organization and a navigation for previous and following days.

Signature:

Tickaroo.embedScores(options)

Values for the options object:

  • options.container (String or Element) The element to use as a container (css selector or element) (required)
  • options.clientId (ObjectID) The Client ID provided by Tickaroo (required)
  • options.locale (String or undefined) force-set the embed language and skip language detection. Unless a value is set, a language will be detected from the browser settings. Currently, we support ‘en’ and ‘de’ for English and German. (default: undefined)
  • options.refreshInterval (Number) the time (in milliseconds) interval to refresh and update the ticker (default: 20000)
  • options.scoreboardClickCallback: function(id) { } will be triggered whenever the user clicks a scoreboard
  • options.itemDOMPostProcessor: function(domItem) { } will be triggered once for every feed load/refresh. Can be used to manipulate the HTML before it is inserted.

Return Value: EmbedScores Object

Example:

<div id="scores">
</div>

<script>
  (function(e,t,n,r,i,s,o){e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},e[i].l=1*new Date;
s=t.createElement(n),o=t.getElementsByTagName(n)[0];s.async=1;s.src=r;o.parentNode.insertBefore(s,o)}
)(window,document,"script",'//cdn.tickaroo.com/embedjs/v1.js',"_tik");

  var options = {
    container: "#scores",
    clientId: <client_id>,
    scoreboardClickCallback: function(id) { alert(' -> id ' + id)},
    itemDOMPostProcessor: function(domItem) {
      var div = document.createElement('div');
      div.innerText = "12345";
      domItem.appendChild(div);
    }
  };
  _tik(function() {
    Tickaroo.embedScores(options);
  });
</script>
  • The tickaroo-powered-by element must remain visible as long as the ticker is visible

The HTML Structure

The following HTML structure is generated within your container to hold the scoreboards

<div class="tickaroo-scores">

  <ul class="tickaroo-scoreboard-list">
  </ul>

  <div class="tickaroo-navigation">
  </div>

  <span class="tickaroo-powered-by">powered by <a href="https://www.tickaroo.com" target="_blank">Tickaroo</a></span>
</div>

Example:

Scores Overview