I am trying to understand a jQuery plugin and I'm seeing things like this all over the un-minified source:
"y" === self.options.direction && node.stop().scrollTop(floorActive * WH),
"x" === self.options.direction && (node.stop().scrollLeft(floorActive * WW), nodeChildren.each(function(index) {
$(this).css("left", index * WW);
})), chocolate && (nodeChildren.each(function(index) {
$(this).css({
left: self.options.direction[index][1] * WW,
top: self.options.direction[index][0] * WH
});
}), node.stop().scrollLeft(self.options.direction[floorActive][1] * WW).scrollTop(self.options.direction[floorActive][0] * WH));
I see things similar to this everywhere too:
return $.each(floorCollection, function() {
(!floor || Math.abs(this[axis] - goal) > Math.abs(floor[axis] - goal)) && (floor = this);
}), floor && -1 !== directionArray.indexOf(floor) ? directionArray.indexOf(floor) : false;
How would these things normally be written out in a more traditional syntax?