Jquery selector error

   var spvalue=$(this).text();
  $("[data-input="+spvalue+"]").prop("checked",true);
The value of

spvalue may be AP 4200 or 6x180

.

jquery.min.js:2 Uncaught Error: Syntax error, unrecognized expression: [data-input=AP 5200]

Uncaught Error: Syntax error, unrecognized expression: [data-input=5*112]
what should be done

Mar.14,2021

quotation marks

// $("[data-input=AP 5200]").prop("checked",true); 
$('[data-input="AP 5200"]').prop("checked",true);

// $("[data-input="+spvalue+"]").prop("checked",true); 
$('[data-input="'+spvalue+'"]').prop("checked",true);

cannot contain a * number

Menu