You need to sign in to do that
Don't have an account?
Display and Hiding Loading Spinner in Salesforce Lightning
I am using the spinner from Salesforce Lightning Design System. The spinner displays on inital page load. However, the spinner never disappears. I am using the aura:waiting and aura:doneWaiting event to call the following controllor logic respectively.
showSpinner : function (component, event, helper) { var spinner = component.find('spinner'); $A.util.toggleClass(spinner, "toggle") ; }, hideSpinner : function (component, event, helper) { var spinner = component.find('spinner'); $A.util.toggleClass(spinner, "toggle") },Please let me know what I am doing wrong.
here is the easy way to doing this
component controller style (for make spinner fix and use z-index for make spinner alwasy front/top) thanks
let me inform if my answer helps you
:)
All Answers
here is the easy way to doing this
component controller style (for make spinner fix and use z-index for make spinner alwasy front/top) thanks
let me inform if my answer helps you
:)
Step 1: Put the following code anywhere you want the Spinner to appear -- such as just below the Command Button:
<div id="spinner">
<p align="center"
style='{font-family:"Arial", Helvetica, sans-serif; font-size:20px;}'>
<apex:image value="/img/loading.gif"/> Please wait -- record is updating! --</p>
</div>
Step 2: Initially hide the Spinner --
<body onload="document.getElementById('spinner').style.display = 'none'">
Step 3: Show the Spinner when the appropriate CommandButton is clicked:
<apex:commandButton action="{!Book_It}" value=" Book It " style="font-size: 20px;" onclick="document.getElementById('spinner').style.display = 'block'"/>