| 24 | } |
| 25 | |
| 26 | function shownotes(){ |
| 27 | let localnotes = localStorage.getItem('notes'); |
| 28 | |
| 29 | if(localnotes == null){ |
| 30 | notesarr = []; |
| 31 | } |
| 32 | else{ |
| 33 | notesarr = JSON.parse(localnotes); |
| 34 | } |
| 35 | cardno.classList.remove('hide'); |
| 36 | let html = ""; |
| 37 | notesarr.forEach(function(element,index){ |
| 38 | html += `<div class="card hide" id="cardno"> |
| 39 | <div class="card-content"> |
| 40 | <h3 id="heading"></h3> |
| 41 | <p id="paragraph"></p> |
| 42 | </div> |
| 43 | </div>`; |
| 44 | }); |
| 45 | |
| 46 | let notes = document.getElementById('notes'); |
| 47 | notes.innerHTML = html; |
| 48 | |
| 49 | } |