For example, if i had a variable in javascript
var nombre;
onclick="nombre='someValue'"
and somewhere along in my code this javascript variable’s value is changed like above, could I set the value of that variable to be the class name in the jquery selector so it would be like
$('.someValue').show()
Yes you can:
This assumes that your variable
nombrehas such scope that it is available in your jQuery code too.