I am trying to select an input where the value equals a dynamic value
trimmed = jQuery.trim(a);
preSelectedCheckBox = $(this).find("input[value=" + trimmed + "]"); 
T开发者_StackOverflowhe element exists but I constantly get no value returned. ($(preSelectedCheckBox).length = 0)
Are you just missing the enclosing single quotes?
trimmed = jQuery.trim(a);
preSelectedCheckBox = $(this).find("input[value='" + trimmed + "']");
preSelectedCheckBox = $(this).find("input[value=" + trimmed + "]");
forget the '' around the value
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论