I have a div that holds all of my social share buttons and some other random content that is around 60% of the sites load time. What I am looking for is a way to lazy load everything in that div. I don't want to have to rely on someone else's script as it always seems to be way more code than is required. Any advice on this would be great. Thank you in advance.
Before you look at doing this maybe you should look to speed up your site. give us a link and we might have a look. You will find that there are usually loads of things you can do to speed your site up without using ajax etc.
Its Android Advice in my signature. With Ads turned off and the social bar hidden the site loads instantly the floating bar is in the posts so just visit any article and you can see it.
My advice -- start stripping off all the jquery bloat and javascript for nothing -- like superfish (scripting assist on a menu should only be needed for IE6/lower), lavalamp, etc... .gut out the IE specific code that does nothing, learn to use analog, webalizer or some other server tracking package instead of wasting time with google tracking -- I'm only seeing one advertisement rendering so why is adsense called like four times... here's a tip -- if people aren't going to click on one ad they're not going to click on four of them... Of course the inaccessible and broken layout (dynamic fonts inside fixed height containers == content overlap here), tables for nothing, use of attributes that have no business on a website after 1997, static CSS inlined in the markup, and of course the code bloat from turdpress not realizing just as Carlin said "not every ejaculation deserves a name" that not every element needs a class on it... doesn't add up to a well coded or fast loading page. As evidenced by the 25k of markup and total of 105k in 57 files to deliver 3.3k of plaintext and eight actual content images -- two to three times as many separate files and two to three times as much markup as should be needed on such a simple page. Even if all those equal-height equal-width boxes are "not viable for web deployment" and it's curious to see an Android oriented website that is USELESS on Android devices thanks to the fixed width and complete lack of responsive layout. Though again this is everything I've come to expect from sites built using wordpress and then have jquery and endless adverts thrown at them. Here's a tip -- throwing more code at it is NOT the answer... which is basically what you're asking about.