Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7407471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:43:40+00:00 2026-05-29T05:43:40+00:00

The checkbox data-binding value is not changing when i try to trigger the click

  • 0

The checkbox data-binding value is not changing when i try to trigger the click event of checkbox.

I have created a jsfiddle, when i click the button i expect the value bind to change but not.

http://jsfiddle.net/2T9QZ/13/

Any help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:43:41+00:00Added an answer on May 29, 2026 at 5:43 am

    Calling trigger(“click”) in jQuery simply triggers your “click” event handler(s). It doesn’t actually cause a click (and thereby a change of the checked state) on the checkbox – the only time it does something like that is in the case where the element has a function property named the same as the event (e.g. form.submit() – but there’s no checkbox.click()).

    But since you’re using knockout, you might as well do:

    var viewModel = {
        IsSelected: ko.observable(false) // Initially false
    };
    
    ko.applyBindings(viewModel);
    
    
    $('#buttonInput').click(function(){
        viewModel.IsSelected(true); // <-------
        // Or, in order to toggle:
        // viewModel.IsSelected(!viewModel.IsSelected());
    });
    

    That’s pretty much the point of using knockout in the first place. Make your changes on the view model, not the view. Since the checkbox’s checked property is data bound to IsSelected, changing IsSelected will change the checked property of the checkbox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data grid that has a checkbox item renderer in a cloumn
Why can't the data in mysql not updated when I use checkbox, I already
I have a checkbox in GridViewColumn which i use for show/change database value. The
T have used checkbox column in gridview. On click of a linkbutton, it should
I have a scenario which is causing strange behavior with WPF data binding and
i have a simple checkbox <CheckBox IsChecked={Binding ForceInheritance}/> In Code i have a class
I have to apply the same data trigger on multiple items. Data trigger is
I have made a CheckedListBox using the following: <ListBox x:Name=lst_checkBoxList ItemsSource={Binding}> <ListBox.ItemTemplate> <DataTemplate> <CheckBox
I have simple issue setting a two-way databinding of a checkbox in Silverlight 3.0.
So - I have a checkbox <asp:CheckBox ID=chkOrder runat=server Visible='<%#IsCheckBoxVisible() %>' Checked=false OnCheckedChanged=chkOrder_CheckedChanged AutoPostBack=true

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.