[JSMentors] Re: Stop loading image - LazyLoad

2011-06-11 Thread tibolan
Thanks all for your feed ! @Alexander: What can i do with window.stop() ? stop loading, make DOM change and reload ? My DOM change will not be lost ? @Trygve: thanks for your interest, i prefer your approach as the one i describe, it really cleaner, but not perfect, as you said @Evan James: the

Re: [JSMentors] Re: Interesting usage patterns for void operator?

2011-06-11 Thread Anton Kovalyov
(Sorry I didn't reply right away, I am in Austin at TXJS) I agree about the ternary operator but that won't work if "something else" has more than one statement. And your example is awesome, thanks! Anton On Wednesday, June 8, 2011 at 5:49 PM, Angus Croll wrote: > It might be clearer to do th

[JSMentors] Library critique

2011-06-11 Thread Anton Kovalyov
Hi all, I've written a tiny unit testing framework named Hiro that runs suites in separate iframe sandboxes. Another neat feature (in my opinion) is that library's code doesn't make any assumptions about its presentation, it just triggers a bunch of events. Any code can listen to them and rende

Re: [JSMentors] Re: Stop loading image - LazyLoad

2011-06-11 Thread Evan James Bowling
Something related that can help is combining all images into a single image and using css to specify different sections throughout the webpage. This can dramatically reduce the number of web requests, though it may be difficult to implement for your particular solution. On Jun 11, 2011 5:23 AM, "Ad

[JSMentors] Feedback/code review for my canvas game

2011-06-11 Thread Nick Morgan
Hi all I've written a basic Snake game in JavaScript. It's available on jsFiddle here: http://jsfiddle.net/skilldrick/bg7UF/ (it's over 300 lines so thought a bit long for copy-pasting) (Also on Github if anyone's interested: https://github.com/skilldrick/jsSnake) I'm going to be using this for a

[JSMentors] Re: Stop loading image - LazyLoad

2011-06-11 Thread Adam
> The reason for the data:image (a 1x1 clear pix) at the src and not just > src="" or no src are to prevent some older browsers to do a "buggy" > request against "/" (the html document). It could be replaced with a > pix.gif or something. This is a bit tangential, but I ran into that last week. I

Re: [JSMentors] Stop loading image - LazyLoad

2011-06-11 Thread Trygve Lie
Hi I've looked into this regarding responsive design and there are several approaches one can use. The sad part are that browsers does behave a bit different. One approach could be: .large{display: none;} .medium{display: none;} .small{display: block;} [snip] where we change the display