material-design-lite
material-design-lite copied to clipboard
MDL - Spinner and "Loading ..." Text
Hi,
I am using the code below to show the MDL spinner when the button is clicked, using the onclick JS function. The problem is however when you click on the button all you ever see if the words "Loading..." the spinner doesnt actually load. I tested cross browser (Chrome/IE) and appears consistent across browser.
Is this my coding approach or something else?
`
Sorry - my code doesnt appear to be showing correctly above - see below
i think you must call the componentHandler to upgrade the element
Hi @aburai - thanks for the follow up.
I read the mini-article here (https://github.com/google/material-design-lite/wiki/How-the-Component-Handler-works) but was not sure if this was the actual problem. Would I call upgradeAllRegistered() when I run my JS function?
Thanks,
GISVPN
`componentHandler.upgradeElement()' for a single element or yes, just upgradeAllRegistered should work too