Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
function xy_percent(n, m) { if(m == 'x') { return (100 * n) / $(window).width(); } else if (m == 'y') { return (100 * n) / $(window).height(); } } function percent_xy(n, m) { if(m == 'x') { return (n * $(window).width()) / 100; } else if (m == 'y') { return (n * $(window).height()) / 100; } }
This paste will be private.
From the Design Piracy series on my blog: