Widgets.us.season.nfl.Injuries

us.season.nfl.injuries shows injuries during the provided season. Injuries are grouped by weeks played. It is possible to display injuries only for a given team.


new Injuries(props)

Parameters
Name Type Description
props object
Properties
Name Type Argument Default Description
seasonId number <optional>

NFL Season id (year).

seasonType string <optional>

Sets the default selected season type. If not set the widget will default to preseason. Valid values are:

  • pre
  • reg
  • pst

week number <optional>

Sets the default selected week. If not set the widget will default to the first week in the selected seasonType. The valid number depend on the value of seasonType.

  • if seasonType is set to pre: valid values are 0 - 4
  • if seasonType is set to reg: valid values are 1 - 17
  • if seasonType is set to pst: valid values are 1 - 5

teamId string <optional>

If set, then only injuries for the given team are displayed. Otherwise injuries for all teams are displayed.

disableHeader boolean <optional>
false

When set to true, disables header with the week selection dropdown.

disableTeamHeaders boolean <optional>

When set to true, disables team headers.

border boolean <optional>

When set to true, enables a border around the widget.

onItemClick function <optional>

Function/event handler. Emits playerId on player row click or touch, teamId and uniqueTeamId on team header click or touch.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="us.season.nfl.injuries" data-sr-season-id="2018"></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.season.nfl.injuries', {seasonId: 2018, disableHeader: 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.media.sportradar.com/uscommon/widgetloader","USW", {
        language: 'en_us'
    });
    USW('addWidget', '#sr-widget', 'us.season.nfl.injuries', {seasonId: 2018, onItemClick: function(type, obj){alert(JSON.stringify(obj));}});
</script>
<div id="sr-widget"></div>