What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-09 23:25:17
export html table to csv javascript
function downloadCSV(csv, filename) { let csvFile; let downloadLink; // csv file csvFile = new Blob([csv], { type: 'text/csv' }); // Download link downloadLink = document.createElement('a'); // File name downloadLink.dow... Add solution -
Other 2021-11-08 02:34:10
check if one of the radio button is checked
//alert(document.querySelector('input[name = "comp"]:checked').value); $test=document.querySelector('input[name = "comp"]:checked').value; if($test="silver") { amount=50; }else if($test="gold") { ... Add solution -
Other 2021-11-07 05:56:09
gsap scroll trigger
gsap.registerPlugin(ScrollTrigger); let tl_main = gsap.timeline({ paused: true }); var crc1 = document.querySelector('.path-18'); var l = crc1.getTotalLength(); // tl first circle let tl_circle1 = gsap.timeline(); tl_circle1.fromTo(crc1, 3, { strokeDas... Add solution -
Html 2021-11-02 22:01:06
scroll to top smooth safari
<!--Example of a button to scroll to top, Remember to use the same id on both the button and the function --> <button id='myBtn' > Click me to go to top! </button> <!-- When the user clicks on the button, scroll to the top ... Add solution -
Javascript 2021-11-02 14:25:10
Converting file to base64 on Javascript client side
function getBase64(file) { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.readAsDataURL(file); reader.onload = () => resolve(reader.result); reader.onerror = error => reject(error); }); } va... Add solution -
Javascript 2021-11-01 12:50:12
document fragment
var list = document.querySelector('#list') var fruits = ['Apple', 'Orange', 'Banana', 'Melon'] var fragment = new DocumentFragment() fruits.forEach(function (fruit) { var li = document.createElement('li') li.innerHTML = fruit fragment.appendChild(... Add solution
Best helpers
Ranking is empty