javascript - jQuery selecting checkbox by class name in TWO separate divs -


I've made a bela of what I'm trying to do:

I have two columns And in each column I basically have a replica of the Nested Uncharted list which has many checkboxes.

As I have checked and unchecked the check box given in the right column

This idea is really to keep the element on the right side, as long as They are selected on the left, then the right side should show only what is chosen (not all elements).

I am taking one step at a time and I have been done once, after checking or unchecking there is a problem getting the checkbox on the right hand side.

Works, but after the first time, it is not.

The code addressing for checking and unchecking is here:

  $ ('.md-left (' 'check' '). ET (' check ', false). Change (function () {var sel = $ (this) .data ("val"); if ($ (this) .is (": chec cad")) {console.log ("check" + sel); $ ('.md-right input.wf-check-' + sel + '[type = checkbox]'). Et ('check', true);} and {console.log ("uncheck" + sel); $ ('.md-right input.wf-check-' + sel + '[type = checkbox]'). At ('check', false);}});   

Can someone help me by selecting the check box and adding them to class names?

Thanks.

The following works (ie not using the jquery attr () function).

  if ($ (this) .is (": check" ) {$ ('.md-right input .wf-check-' + sel + '[type = checkbox]') [0]. Checked = true;} and {$ (.mod-right input .wf- Check-'++) [[type = checkbox]') [0]. Checked = wrong; }   

Of course, this would be good as code:

  $ ('.mod-right input.wf-check-' + + sel + ' [Type = checkbox] ') [0]. Checked = $ (this). This (': check');    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -