TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mega Anaska
NA
144
36.2k
get value in hidden checkbox
Jan 15 2018 11:06 PM
hi guys I have coding html like
<div class="m-t-10" style="margin-bottom:10px;">
<div class="switch-ss">
<input type="checkbox" data-init-plugin="switchery" />
</div>
<button class="btn btn-white btn-xs btn-mini bold fs-14 btn-default" type="button"><i class="fa fa-trash-o"></i></button>
<div class="clearfix"></div>
</div>
and css like :
.switch-ss{
display: block;
padding: 5px;
background-color: #fff;
border-radius:2px;
width: 30px;
height: 27px;
float: left;
line-height: 14px;
margin-right: 5px;
}
.switchery{
height: 9px !important;
width: 20px !important;
border-radius:10px !important;
border-color:#dedede !important;
}
.switchery>small{
height: 9px !important;
width: 9px !important;
/* margin-top: 1px; */
background-color: #a8aaab !important;
border-radius:100% !important;
}
the question is I want get value when I click that switch but when I click the switch the checked always return false, what should i do ?
this is my javascript
var chk = $('.switch-ss input[type=checkbox]').is(':checked');
console.log(chk)
Reply
Answers (
7
)
WRite test cases for following condition???
What is happening in the following javascript code: