google / google/material-design-lite

Cannot dynamically add a slider

Open
#5,202 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
32.2k
Forks
4.9k
PR merge metrics
No merged PRs in 30d

Description

Hi,
I want to add a new slider component of MDL library by using JS. When I define the slider component in the HTML the component is correctly loaded but when I try to add it by using javascript the style isn't applied to the slider. Why is it happening? An exception is thrown : Cannot read property 'insertBefore' of null
[sasso.txt](https://github.com/google/material-design-lite/files/1844230/sasso.txt)
![image](https://user-images.githubusercontent.com/20090150/37862633-855afc78-2f50-11e8-96a0-5ac46752f995.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.