I can select an HTML5 element by data-* element with:
$("[data_value='5']")
However, I'd like to replace the 5 with a jQuery variable. When I do, I am no longer able to select the element. For example:
> $("[data-uid='4']")
[<div class="eventInfo individual" data-uid="4">…</div>]
> var uid = 4
> $("[data-uid=uid]")
[]
How do I make a selection using a variable?
$("[data-uid=uid]"), how could it possibly know which if anyuidshould use the variable?