Thursday, 19 May 2016

javascript - Single or Double quotes in jQuery











This is specifically for jQuery not JavaScript in general since I'm not a JavaScript programmer and I'm starting to learn jQuery.



With the release of jQuery 1.6 was there a specific change on using single or double quotes?



For example, would the following function work in jQuery 1.6?:



$('.selector').show();



Or do I have to use double quotes?:



$(".selector").show();


Thanks in advance for any clarification.


Answer



JQuery Core Style Guidelines says:




"Strings should always use double-quotes instead of single-quotes."


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...