Widgets.us.match.nfl.TurnoverCalculator

Widget us.match.nfl.turnoverCalculator compares the turnovers between the two teams playing and shows all turnovers by quarter.

For the widget to render you need to provide matchId, other properties are optional.


new TurnoverCalculator(props)

Parameters
Name Type Description
props object
Properties
Name Type Argument Default Description
matchId string

Match Id.

disableWidgetHeader boolean <optional>
false

When set to true, hides widget header.

disableMatchHeader boolean <optional>
false

When set to true, hides match header.

collapseGameInformation boolean <optional>
true

When set to false, opens the game information section

selectedQuarter number <optional>
null

Displays turnovers of the specified quarter. Can be one of [null, 1, 2, 3, 4, 5]. The 5th quarter is overtime, null means no restriction. Defaults to null.

selectedTurnover number <optional>
null

0 based index setting the displayed turnover in the quarter set with selectedQuarter (if selectedQuarter is not provided the first quarter will be selected).

enableTeamSelect boolean <optional>
false

When set to true, enables team selection. Interactive areas are:

  • team name and crest in a match header,
  • team crest under Turnover comparison
TeamId is emitted on click or touch.

onTrack function <optional>

Function/event handler, see Widgets.onTrack.

border boolean <optional>

If true, it draws a border around widget.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="nfl.game.summary" data-sr-match-id="sd:match:2724b0ed-71b1-4c35-a977-087f4f9404f4"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/uscommon/widgetloader" data-sr-language="en_us" 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.media.sportradar.com/uscommon/widgetloader","USW", {
        language: 'en_us'
    });
    USW('addWidget', '#sr-widget', 'us.match.nfl.turnoverCalculator', {matchId: 'sd:match:2724b0ed-71b1-4c35-a977-087f4f9404f4'});
</script>
<div id="sr-widget"></div>