How to set input data-toggle for a link in bootstrap?

127
March 13, 2018, at 5:27 PM

I have a link and I want to set a bootstrap toggle for it :

<input id="toggle-event" type="checkbox" data-toggle="toggle" data-on="Un Checked All" data-off="Checked All">
<div id="console-event"></div>

I want to implement this bootstrap modal for the link :

$(function () {
    $('#toggle-event').change(function () {
        var value = $(this).prop('checked'); //   $('#console-event').html('Toggle: ' + $(this).prop('checked'))
        if (value == true) {
            $('#datatable1').find('input').prop('checked', true);
        }
        else {
            $('#datatable1').find('input').prop('checked', false);
        }
    })
});
READ ALSO
Does a zero width character that is skipped by the caret while moving it with keyboard arrows exist? (ie11, contenteditable)

Does a zero width character that is skipped by the caret while moving it with keyboard arrows exist? (ie11, contenteditable)

I have a div with several span tags insideIn each span tag I put zero-width character:

68
Why on click on element returns undefined in jquery? [duplicate]

Why on click on element returns undefined in jquery? [duplicate]

This question already has an answer here:

64
Add row only once when found with multiple duplicate values javascript

Add row only once when found with multiple duplicate values javascript

How to add row only once when found with multiple duplicate valuesHere it adds rows according to the number of accountNumber == accountNumberInTable found

84