Matheus Velloso
Matheus Velloso

Reputation: 175

verify state load page bootstrap switch

I am using the bootstrap switch in my checkboxes. I want to check what is the state of my checkbox in loading the page using this library.

Upvotes: 0

Views: 465

Answers (1)

Matheus Velloso
Matheus Velloso

Reputation: 175

Look how simple it was to answer: D

$(document).ready(function() {
    //get state
    var state = $("#checkbox").bootstrapSwitch('state');
});

Upvotes: 2

Related Questions