Parameters
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
props |
object |
<required> |
||
sportId |
number | 1 | Sport id. Check |
|
showOdds |
boolean | false | When set to |
|
disableOdds |
boolean | false | When set to |
|
groupTournaments |
boolean | false | When set to |
|
tournamentId |
number | Tournament id. When set, updates league selector and displays tournament's fixtures. |
||
favoriteTournaments |
string | A comma-separated list of tournaments (shown on top of league selector). The default values depend on the selected sportId. If the selected sport is soccer than the default value is: ['ut17', 'ut35', 'ut8', 'ut34', 'ut23', 'ut7'], if the selected sport is basketball the default value is ['ut132', 'ut138'] |
||
autoSelect |
string | false | If set, it will automatically select first match in the view. Valid values are: |
|
persistantSelection |
number | 24 | Number of hours to save current user's selection into browser's local storage. |
|
persistantSelectionKey |
string | A key used for prefixing all values stored by 'persistantSelection' option. Useful when a widget is used on same domain but different pages, where each page should have its own persistant state. |
||
layout |
string | vertical | Switches between |
|
verticalLayoutType |
string | list | Works in pair with layout(=vertical). Switches between |
|
onItemClick |
function | Function/Event handler, emits |
||
onTrack |
function | Function/event handler, see Tracking options. |
||
filterUtIds |
string | Comma-separated unique tournament ids. When set, only matches within specified unique tournaments will be listed. |
||
disableRoundSelector |
boolean | false | When set to |
|
hideLimitedCoverageIcon |
boolean | false | When set to |
|
round |
boolean | Round. When set, the round is automaticaly selected. |
Examples
HTML/Declarative
<div id="sr-widget" data-sr-widget="season.fixtures" data-sr-sport-id="1" data-sr-disable-odds="true"></div>
<script type="application/javascript" src="https://widgets.sir.sportradar.com/sportradar/widgetloader" async></script>
JS/Programmatic
<script>
(function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
)})(window,document,"script","https://widgets.sir.sportradar.com/sportradar/widgetloader","SIR", {
language: 'en'
});
SIR('addWidget', '#sr-widget', 'season.fixtures', {sportId: 1, disableOdds: true});
</script>
<div id="sr-widget"></div>
JS/Example of using Event Handler
<script>
(function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
)})(window,document,"script","https://widgets.sir.sportradar.com/sportradar/widgetloader","SIR", {
language: 'en'
});
SIR('addWidget', '#sr-widget', 'season.fixtures', {sportId: 1, disableOdds: true, onItemClick: function(type, obj){alert('matchId: ' + obj.matchId);}});
</script>
<div id="sr-widget"></div>