Methods
(inner) createLike(like) → {HTMLElement}
Creates the songs hate/love elements
Parameters:
Name | Type | Description |
---|---|---|
like |
number | like value 0 - 2 |
- Source:
Returns:
div element
- Type
- HTMLElement
(inner) createStarRating(rating) → {HTMLElement}
Creates a button group for star rating
Parameters:
Name | Type | Description |
---|---|---|
rating |
number | the rating (0-10) |
- Source:
Returns:
div element
- Type
- HTMLElement
(inner) setRating(el, rating) → {void}
Sets the star rating element
Parameters:
Name | Type | Description |
---|---|---|
el |
HTMLElement | container for the stars |
rating |
number | the rating (0-10) |
- Source:
Returns:
- Type
- void
(inner) showStarRating(rating) → {HTMLElement}
Shows the stars rating
Parameters:
Name | Type | Description |
---|---|---|
rating |
number | the rating (0-10) |
- Source:
Returns:
div element
- Type
- HTMLElement
(inner) voteSongLike(el) → {void}
Song love/hate event handler
Parameters:
Name | Type | Description |
---|---|---|
el |
EventTarget | triggering element |
- Source:
Returns:
- Type
- void
(inner) voteSongRating(el) → {void}
Song rating event handler
Parameters:
Name | Type | Description |
---|---|---|
el |
EventTarget | triggering element |
- Source:
Returns:
- Type
- void