So I am trying to implement a basic image lazy load feature to speed up the loading of my website. From what I understand the Jquery plugin lazyload worked for a while but is no longer supported for new browsers.
My question is simple:
How do other sites do it then? Sites such as facebook do have support for this type of thing, so there has to be an answer out there. I'm aware that they have full teams of developers for this sort of thing, but with all of the complexities of javascript there has to be a feasible solution.
So does anyone have a patch for the lazyload plugin or a way to do it that works? It would be greatly appreciated. Thank you.
EDIT
My previous research seemed to indicate that all of the tutorials were using the same plugin since there are many that are named similarly. However there are many differing variations and I was unclear in my original question.
I will try to find a cross-browser solution based on the suggestions below and post it here to make this post more useful for others.
Try this on for size: http://ivorycity.com/blog/2011/04/19/jquery-lazy-loader-load-html-and-images-on-scroll/
Worked fine for me in Chrome.
Try Ryan Grove's LazyLoad library http://github.com/rgrove/lazyload/
Related
I've almost completed a website built in Wordpress, using a theme called WP Foocamp. My problem is that whilst the site looks great in most modern browsers, mobiles etc I am still struggling with IE8. I don't have an in-depth knowledge of javascript or PHP which makes this really difficult, but if I could find out where the problem is then I could research where to fix it.
Any help would be MASSIVELY appreciated.
The url is ipswichhalfmarathon.com
I recently did a complete answer on the subject of IE pre 9. Go and check it out here
I am looking for a jQuery library to help with handling bidirectionality
Google has one in the closure library, but I feel it is a waste to include all of the library just for bidi input support (unless you recommend me otherwise)
http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/bidiinput.html
the google closure library is a seemingly endless collection for files, with many dependencies. I don't see how using it for 1 function is efficient
http://closure-library.googlecode.com/svn/trunk/closure/goog/
update
I found this from a drupal project. I am unable to make it work. Anyone know of it?
update2
it seems that adding "dir=auto" to the input field handles it.
works in chrome and ff. anyone can confirm this?
dir=auto should fix it.
it is in the html5 standard, although safari doesn't work with it
http://www.w3.org/International/tutorials/new-bidi-xhtml/qa-html-dir
works with chrome and firefox.
Thanks me :)
I've been testing a website on mobile devices which uses a simple hide() / show() on a form. Works great on the desktop but not at all on mobile devices. Does anyone know if the functions are supported?
Using jQuery 1.5
Thanks
Ric
Yes, jQuery works fine on iPhone and Android.
yes works fine,
I had done in many projects for smartphones (iPhone, Android) specially and works as charm
you can be sure for this, because, new mobile web framework, jQtouch, and jQuery mobile is in jQuery and alot others too.
Ric I wouldn't say that combining all of the JS files together is really that bad of a solution, in fact I think that minifying and combining JS code is a great practice, unless you need people to be able to read your JS from source for some reason. Glad you got it fixed.
Okay, this is a terrible answer and thanks to everyone for their help.
In the end I combined all the JS files together. This fixed the script execution order problem on iPhone / Android. I'm not sure why it was happening on this particular site, and only on mobile phones.
It's not a very elegant solution and I do not recommend it. In my case it was for a temporary microsite so decided it was acceptable. Should I discover more about the problem I will post it here.
As Colt pointed out I was a bit rash saying it wasn't en elegant solution combining all the files together. In fact it is just what you should be doing! My frustration was that desktop and mobile browsers handled the JS different, and when developing the site I don't combine/minify the files until I know they work. Makes debugging and updating libraries easier.
As I feel bad for suggesting poor advice here's a little top tip: When on the production server I use Smart Optimizer (http://farhadi.ir/works/smartoptimizer) to handle joining, minifying, GZipping and caching the files for me. Means my dev code remains nicely seperated and it's easy to up jQuery, plugins etc but on the live site everything is nicely stuck together.
I am working on a legacy ASP.NET web site that is highly dependent on Internet Explorer. I would like to migrate it to non-IE browsers. I know there are a large amount of differences (as detailed at quirksmode.org, etc.), so I'm searching for a javascript library that can help minimize the amount of source I'd have to change.
I'm hoping that my lack of success in finding such a beast so far means that I'm just a bad google-er, and not that I'm just going to have to slog through coming up with replacements/workarounds for all of IE's proprietary functionality that this site currently uses (it uses quite a bit).
Any help you can provide will be greatly appreciated. Thanks!
Frankly you should probably convert the site to a well known multi-platform javascript library such as ExtJs or jQuery.
This'll let you standardize your javascript to work on all browsers (including ie)
I suspect that you're going to have to slug through a little. I don't know much about IE, but I'm really happy when I use jQuery. There are many functions and modules that expand the functionality available. And there is lots of help here on Stack Overflow and at api.jquery.com.
Good luck!
I have a couple of pages working with Firefox but JSMX isn't passing the form variables through when using IE7.
Has anybody experienced this?
I did a search, here at SO, for "JSMX". This is the only question that was found.
The JSMX website lists the "Latest News" at Feb. 10th, 2008.
jQuery does everything JSMX does, and easier too. jQuery also does much, much more.
jQuery has a huge install base, tons of support and even free script-hosting by Google, Microsoft, etc.
So, the answer is forget JSMX and use jQuery.