Skip to content

Commit

Permalink
Updated Example file
Browse files Browse the repository at this point in the history
Removed extraneous dependency from examples file
  • Loading branch information
bwva committed Jun 13, 2024
1 parent 19d58ae commit f26ab88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions ex/html_spinner_examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ <h2 style="text-align:center">Some Examples</h2>
<button type="button" onclick="
if (this.innerHTML == 'Search') {
let spn = `&lt;x-spinner id='spinMe'>&lt;/x-spinner>`;
setItemValue('searching', spn );
document.getElementById('searching').innerHTML = spn;
const spinM = document.getElementById('spinMe');
spinM.setAttribute('sp', '.5');
spinM.setAttribute('rotor-style', 'double');
Expand All @@ -272,7 +272,7 @@ <h2 style="text-align:center">Some Examples</h2>
this.innerHTML = 'Cancel';
}
else {
setItemValue('searching', ' &nbsp; ');
document.getElementById('searching').innerHTML = ' &nbsp; ';
this.innerHTML = 'Search';
}
">Search</button>
Expand All @@ -285,15 +285,14 @@ <h2 id="searching" style="color:red;"> &nbsp; </h2>
if (this.innerHTML=='Spin It') {
const sp = new SpinnerElement( {} );
sp.id = 'thisSpinner';
setItemValue(spng.id, '');
spng.innerHTML = '';
spng.appendChild(sp);
sp.setStyle( {'font-size': '3em'} );
sp.setAttributes({color: 'turquoise', prefix: 'Spinning ', rstyle: 'double', role: 'status', 'aria-wrap': 'true' });
this.innerHTML='Stop It';
}
else {
clearItem(spng.id);
setItemValue(spng.id, ' &nbsp; ');
spng.innerHTML = ' &nbsp; ';
pausebtn.style.visibility = 'hidden';
this.innerHTML='Spin It';
}
Expand Down Expand Up @@ -902,7 +901,6 @@ <h2 style="text-align:center">Sources</h2>
</p>
</section>
<hr>
<script src="./scripts/KALE.js"></script>
<script src="./scripts/spinnerComponent.js"></script>
<script>
// Create a new spinner with a faster default speed & reverse spin
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "HTML-SpinnerElem",
"version": "1.0.8",
"version": "1.0.10",
"description": "A Javascript class for creating a custom web component to insert a spinner with options.",
"main": "spinnerComponent.js",
"scripts": {
Expand Down

0 comments on commit f26ab88

Please sign in to comment.