I\'m very new with javascript.
I\'m trying to create a tag using document.write (with Wordpress) to add a style that hides images before they are preloaded. I\'ve h
You don't need to add tag, you can just hide them with jQuery:
jQuery(function($) {
$('.preload img').hide();
$('#body-wrap').preloadThis();
});
Don't know how your preloadThis() function works, but I guess it loads images and removes .preload class from img container. If it indeed works like that, this code will not help you - images will stay hidden.