minhur / bootstrap-toggle

Bootstrap Toggle is a highly flexible Bootstrap plugin that converts checkboxes into toggles
http://www.bootstraptoggle.com
MIT License
1.48k stars 440 forks source link

Can't get toggle working properly #209

Open cetk opened 5 years ago

cetk commented 5 years ago

I have bootstrap 3.3.7 installed and trying to use simple button toggle. I have tried the way

but it shows as regular checkbox and not toggle one. Am I missing something ?

djibe commented 5 years ago

Hi, please send your HTML code so we can help you fix this.

cetk commented 5 years ago

One way

       <input type="checkbox" data-toggle="toggle" data-on="Generate" data-off="Do Not 
       Generate">

Other way

        <div class="btn-group btn-group-toggle" data-toggle="buttons">
         <button ng-class="{'btn btn-light': claim.PartnerClaimDecision, 'btn btn-primary active': 
          !claim.PartnerClaimDecision}"data-toggle="toggle" aria-pressed="false" 
          autocomplete="off" ng-click={claim.PartnerClaimDecision !=                        
           claim.PartnerClaimDecision}>Do Not Generate</button><label> </label>
           <button ng-class="{'btn btn-light': !claim.PartnerClaimDecision, 'btn btn-primary 
                         active': claim.PartnerClaimDecision}" data-toggle="toggle" aria-pressed="true" 
                         autocomplete="off">Generate</button></div>
TheBearF8 commented 4 years ago

Did you manage to find a solution? I'm having the same issue. It appears once or twice but mainly just looks like a standard checkbox, not a toggle

danielschristian commented 2 years ago

@cetk Please post your entire HTML, could be an issue with how you're importing it