How to match table data to checkbox text in jQuery -
i want match each span text inside table text next each checkbox , checkbox should checked according condition within if statement.
$('#sometable').find('span').each(function () { var empdes = $(this).text(); $('.divclass').find('.checkboxclass').each(function () { var chktext = $(this).next().text(); if (empdes == chktext) { $(this).prop('checked', true); } }); });
Comments
Post a Comment