For my blog, http://seans.ws, I wrote a script that looks at the size of an image, and if it is wider than the default container size it figures out how much negative margin it needs to center it with the rest of the content.
This works great, but I have images loading in via infinite scroll, and they are not manipulated by my script.
My infinite scroll js: http://static.tumblr.com/q0etgkr/ytzm5f1ke/infinitescrolling.js
$(window).load(function() {
var centerBigImages = $(function() {
$('img').css('marginLeft', function(index, value){
if($(this).width() > 660) {
return -($(this).width() - 660)/2;
}
return value;
});
});
centerBigImages();
I took a look at this DOMNodeInserted equivalent in IE?, but it was a little over my js newb head :(