I'm using the following selector with a string containing double quotes:
var something = 'This string contains "double" quotes';
$('*[my-data-attribute="' + something + '"]').click(function () {
});
This gives:
Uncaught Error: Syntax error, unrecognized expression
Which could be the best solution to solve it ?