javascript - validate dynamic radiobutton div in jquery -


I am creating dynamic table rows with radio buttons and buttons. If I add control buttons then the row will be dynamically created. Radio button ID radiodiv

I need to highlight the radio button's device, if the radio button option is not selected.

This was working for the first line, the rest of the table was not doing this work.

Now I need to, if I press the control button, then each row will have to reveal the division of the radiobutton. How to do it Click

  $ ("# inputId") (function () {var table = $ ('table # mytable'); var line = "& lt; tr & gt; & lt;  
& lt; / div & gt; * "+" & lt; td & gt; & lt; Input Type = 'button' id = 'btned' value = 'valid controller' /> gt; var c = = ('& lt; td style = "width: 100px;" align = "Left"> ;); $ ('# Tableview') attached (table.append (line));}); // radio button check or not $ ('# mytable'). ('(' ('(' $ '' ('(Input': '' '' '(' Css ('border', '') and $ ("# radioteague"). ('' Checked '')

Some issues are:

  1. The ID should be unique per page, so both sections should be radiodiv and btnAdd.
  2. Press the button From the context of you I have updated Bella here:

    These changes are:

      $ ("#######################################) InputId "). (Function () {var table = $ ('table # mytable'); var line =" <">  
    & Lt; Input type = 'button' class = 'btned' value = 'valid controller' /> & Lt; / Td> "Var var = $ ('& td style =" width: 100px; "align =" left "& gt; ('Click', '.btnAdd', function () {$ (this) .parents ('append (line));}); // check radio button or not $ (' # mytable '). Tr '). (Search for' input: radio ') .each (function () (if ($ ("Input: radio [name =' gender ']"). (": Checked")) $ (this ) .clostest (".radiiodiv"). Css ('border', '') and $ (this) .closest (". Radiodiv"). Css ('border', '1px solid red')}}};

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -