Yep.
Yep.
$.fn.tallest = $.fn.tallest || function(outer, margins) {
var fn = outer ? "height" : "outerHeight";
return Math.max.apply(Math, $.map(this, function(el) {
return $(el)[fn](margins);
}));
};
$.fn.widest = $.fn.widest || function(outer, margins) {
var fn = outer ? "width" : "outerWidth";
return Math.max.apply(Math, $.map(this, function(el) {
return $(el)[fn](margins);
}));
};
EDIT: Math.max.apply(Math, array), not Math.max.apply(null, array) for IE6.
EDIT 2: $.map doesn’t call the function in the context of each object, but instead passes it as the first argument. Arg.
$.fn.maxWidth = function(outer, margins) {
var o = 0,
fn = outer ? "width" : "outerWidth";
$.each(this, function() {
o += $(this)[fn](margins);
});
return o;
};
$.fn.maxHeight = function(outer, margins) {
var o = 0,
fn = outer ? "height" : "outerHeight";
$.each(this, function() {
o += $(this)[fn](margins);
});
return o;
};
From a colleague working on a site audit:
<div class="SeoSection"> <!-- Search Engine Optimization //--> <h1>Overview</h1> </div>
What is a Browser? (via jibyollee)
I went to school with that guy (the one with the microphone).
Spreadsheet 1: 1562 rows x 2 prototypes
Spreadsheet 2: 2744 rows x 2 prototypes
Spreadsheet 3: 815 rows x 2 prototypes
Add it all together and I have to copy and paste 10,242 links into these templates for user acceptance testing. Shoot me now.
My next project is the main navigation for an ecommerce site that’s had a history of problems with accessibility. They’re also very design-focused, so we’ll need to redevelop standard UI controls to make them look prettier. ARIA will play a big role in this.
This video is long and slow, but definitely has a lot of great information about developing for accessibility, including a reference to a site I’ve never heard of: CodeTalks.
Worst. Project. Ever is almost over.
In the meantime, I enjoyed exploring the JavaScript architecture ideas from Jim Benton and Yehuda Katz. I have a simple state machine going, and it has some nicely declarative logic definitions. I need to see how well it scales to the type of UI work we tend to do here.
Today, I’m working:
and I’m escaping to my personal macbook when I just can’t take it anymore.