The expression $(
.timeslot-time[data-start=${preselectedtime}])
is using string interpolation ${}
to insert the value of a variable into a string that will be used as a jQuery selector.
To fix this expression, you can wrap the variable with quotes to ensure that the selector is properly formatted. Here's how it should look:
index.tsx53 chars2 lines
Notice that the variable preselectedtime
is now surrounded by double quotes inside the selector attribute value. This will make sure that the selector works as expected.
gistlibby LogSnag