I must be missing some differences with my selector or filter with the recent version update.
Previously (which still works with 1.4.3 ), i have stored my checkboxes in an html array:
- <input name="purpose[]" type="checkbox" value="val1" >val1
- <input name="purpose[]" type="checkbox" value="val2" >val2
- <input name="purpose[]" type="checkbox" value="val3" >val3
- <input name="purpose[]" type="checkbox" value="val4" >val4
and i pass the results from the array to js through json_encode:
(for instance just to get some values)
- $myVals['purpose'] = array("val2","val4");
- app_arr = <?php echo json_encode($myVals) ?>;
Before the update, this function cycled through all my checked values and checked them
- for ( key in app_arr["purpose"] ) {
$("input[name=purpose\\[\\]]").filter("[value=\"" + app_arr["purpose"][key] +"\"]").attr("checked",true);}
After the update, something isn't kosher, and none of my vals end up with the new attribute. I've also tried something like this (which also doesn't work with the new update, but still with 1.4.3):
- $("input[name=purpose\\[\\]]").filter(function(index) {
if ( $(this).val() == "val2" ) { return true; } }).attr("checked",true); });
Any help would be greatly appreciated. This is just an example .. some of my other arrays contain a checkbox, and input values, but this method of selecting/filtering no longer works for those either.