I quite often see JavaScript with variables that start with a dollar sign. When/why would you choose to prefix a variable in this way?  (I'm not asking about $('p.foo') syntax that you see in jQuery and others, but normal variables like...
The code in question is here:   var $item = $(this).parent().parent().find('input');   What is the purpose of the dollar sign in the variable name, why not just exclude it?...
Are there any standard ways of marking a function argument as unused in JavaScript, analogous to starting a method argument with an underscore in Ruby?...
While coding JavaScript sometimes you store the reference of object this in a local variable for different purposes (to set proper scope, to help code obfuscators, etc.). There are coders who prefer aliasing this to that to make it obvious its intent...
Let's say I have a function in a view that triggers when some kind of state is changed. What would be best to name it and why?   stateChange stateChanged onStateChange onStateChanged...
I am using ASP.Net to serialize classes designed in C# to JSON. My Javascript application then requests those objects with AJAX. I have done this on a couple of projects now, but I run into the problem that the C# standard naming conventions use Pasc...
This is related to naming conventions for a DOM element's id attribute and I guess the name attribute as well. When it comes to JavaScript, from what I understand and have done is always use camel case except for the names of classes. Classes are...
I'm wondering if is there a naming convention to namespacing events with AngularJS?  jQuery defines its convention as event.namespace (with namespace at the end, and dot separator)  I've seen some articles (example) where events are named lik...
Context  I read a JavaScript code example written by Google. It used:   Single lowercase letters for naming variables Single uppercase letters for naming functions   So the code was illegible.  Questions   Why this naming? What tools are using to do...
I'm adopting a large mish-mash of Javascript / jQuery code. I'd like to move it to Backbone.js but as an intermediary, I'm trying to namespace it so that it is sligthtly more modular.  I am wondering if there is a standard for namespaces...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.