- Indentation - 4 spaces
- Line Length - 80 characters
- Required License in File Header
- variables and functions - lowerCamelCase
- constructor like functions - UpperCamelCase
- constants - ALL_UPPER_CASE_WITH_UNDERSCORES
Element.addMethods({ | |
setPngBackground: (function() { | |
var IEBelow7 = (function(agent) { | |
var version = new RegExp('MSIE ([\\d.]+)').exec(agent); | |
return version ? parseFloat(version[1]) < 7 : false; | |
})(navigator.userAgent); | |
return function(element, url) { | |
element = $(element); | |
var options = Object.extend({ |