skip to Main Content

how to change a bootstrap switch from ON state to OFF state using javascript – Jquery

how to change a bootstrap switch from OFF state to ON state using javascript. the switch html code is below, <input type="checkbox" class="alert-status" name="ab1" id="ab1" data-size="normal" data-on-text="OFF" data-off-text="ON" checked data-bootstrap-switch data-off-color="success" data-on-color="danger"> script code, $('.alert-status').bootstrapSwitch('state', false); i tried some steps…

VIEW QUESTION

Query / Json How can I save Data and Heading name in my local storage? – Jquery

$(document).ready(function () { $(":button").click(function () { var btn = $(":button").val(); if (btn == 'Favoritisieren') $(":button").css("background-color", "red").prop('value', 'Favoritisiert'); var obj = {"Hed.1" : $("h1")}; var myJSON = JSON.stringify(obj); localStorage.setItem('myJSON'); else $(":button").css("background-color","blue").prop('value','Favoritisieren'); }); }); hey, I would like to save the filename…

VIEW QUESTION
Back To Top
Search