jquery: removing unnecessary trailing and leading spaces & tabs.
This commit is contained in:
parent
20a7bff401
commit
3f5ff3097c
7 changed files with 241 additions and 241 deletions
|
@ -3,23 +3,23 @@ jQuery.each([ "Height", "Width" ], function(i, name){
|
|||
|
||||
var tl = name == "Height" ? "Top" : "Left", // top or left
|
||||
br = name == "Height" ? "Bottom" : "Right"; // bottom or right
|
||||
|
||||
|
||||
// innerHeight and innerWidth
|
||||
jQuery.fn["inner" + name] = function(){
|
||||
return this[ name.toLowerCase() ]() +
|
||||
num(this, "padding" + tl) +
|
||||
return this[ name.toLowerCase() ]() +
|
||||
num(this, "padding" + tl) +
|
||||
num(this, "padding" + br);
|
||||
};
|
||||
|
||||
|
||||
// outerHeight and outerWidth
|
||||
jQuery.fn["outer" + name] = function(margin) {
|
||||
return this["inner" + name]() +
|
||||
return this["inner" + name]() +
|
||||
num(this, "border" + tl + "Width") +
|
||||
num(this, "border" + br + "Width") +
|
||||
(!!margin ?
|
||||
(!!margin ?
|
||||
num(this, "margin" + tl) + num(this, "margin" + br) : 0);
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
|
||||
function num(elem, prop) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue