Widgets.us.season.ncaaf.TopPlayersCarousel

us.season.ncaaf.topPlayersCarousel displays top players stats in carousel

To have specific stats for players, statString must be set

List of stat keys:

  • pasy (Passing yards)
  • past (Passing touchdowns)
  • pcp (Passing completion percentage)
  • pasi (Passing interception)
  • rua (Rushing attempts)
  • ruy (Rushing yards)
  • rut (Rushing touchdowns)
  • ypc (Yards per carry)
  • rer (Receiving receptions)
  • rey (Receiving yards)
  • ret (Receiving touchdowns)
  • sac (Sacks)
  • int (Interceptions)
  • inty (Interception yards)
  • ff (Forced fumbles)
  • tac (Tackles)

new TopPlayersCarousel(props)

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

Season id.

year number <optional>

Season year.

statString string <optional>

String with stat keys (pasy, past, pcp, pasi, ...).

seasonType string <optional>
'regular'

Season type. Options are: regular, total, playoffs.

conference string <optional>

Conferences. Options are: aac, acc, big12, b1g, cusa, independent, mac, mwc, sec, sbelt, pac12.

autoplay boolean <optional>
true

Carousel autoplay turned on/off.

autoplaySpeed number <optional>
5000

Carousel autoplay speed (ms).

border boolean <optional>

If true enables a border around the widget.

onItemClick function <optional>

Function/event handler. Emits playerId on click or touch.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="us.season.ncaaf.topPlayersCarousel" data-sr-season-id="90381"></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.ncaaf.topPlayersCarousel', {seasonId: 90381});
</script>

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.ncaaf.topPlayersCarousel', {seasonId: 90381, onItemClick: function(type, obj){alert('playerId: ' + obj.playerId);}});
</script>
<div id="sr-widget"></div>