Hi I was just testing jQuery with React JS for some reason. But facing an issue like this. when I try this in console
$(".cities-container select").val()
I got this
Uncaught TypeError: $(...).val is not a function
But when I try this
$(".cities-container select")
I got whole select element in the console, means jQuery is working but not .val method
any suggestions...?
$is a shortcut for the document query selector in the browser. developer.mozilla.org/en-US/docs/Web/API/Document/querySelector