KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How can I deploy the Radio Button group and make one of the buttons pre-toggled? I have a radio-buttons group with days of the weeks values. This one: <div class="btn-group" data-toggle="buttons-radio"> <button class="btn" id="test0">Mon</button> <button class="btn" id="test1">Tue</button> <button class="btn" id="test2">Wed</button> <button class="btn" id="test3">Thu</button> <button class="btn" id="test4">Fri</button> <button class="btn" id="test5">Sat</button> <button class="btn" id="test6">Sun</button> </div> What I need is to fetch the current day value (using var currentDay = new Date().getDay() ) and toggle (activate) the corresponding button in the group. And I'm trying to toggle it with the next code (just in testing purposes): $("#test0").button('toggle') This is not working.
Tags (comma-separated)
Save Edits
Cancel