0

I want to disable a div block of spinner.

HTML:

    <div class="spinner-grow" role="status" id="buspinner" style="width: 20px; height:20px; margin-top: 5px">
        <span class="visually-hidden">Loading...</span>
    </div>

Javascript:

var spinElement = document.getElementById("buspinner"); 
spinElement.disabled = true

I followed below answer and used above steps, but it's not working. What am I missing here? Enable & Disable a Div

Dr. Essen
  • 603
  • 2
  • 9
  • 25
  • Div elements don't have a disabled property. Is this a Bootstrap component property? What are you actually trying to accomplish? – isherwood May 28 '21 at 19:54
  • I have used select2 library for multiselect dropdown, so as a feature to add spinner inside select field, it's an alternative to add an spinner outside the select field. – Dr. Essen May 28 '21 at 19:58
  • If you see, the answer also includes that "*This will disable just the div*" – Dr. Essen May 28 '21 at 20:00
  • If you look a little deeper you'll find it mentioned that you can only disable certain element types, such as inputs. – isherwood May 28 '21 at 20:40

0 Answers0