You are allowed to use both. In JavaScript there is no difference between both (while e.g. in PHP there is a difference).
By the way, this is a JavaScript question. You are passing a string to the $()
function, and strings have to be surrounded by '
or "
.