Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should set the href so that people know what they're going to be loading. That can be done on the a element when the page is generated, or in JS. It has to be on the element if you want your page to work for people who have Javascript disabled.</p> <pre><code>var url = "http://www.youtube.com/watch?v=" + videoId; $(this).attr('href', url); </code></pre> <p>You should also tell people what will happen if they click either by setting a title: </p> <pre><code>$(this).attr('title', "Click to play video"); </code></pre> <p>Or by creating an overlay like the ones at the <a href="http://smh.domain.com.au/real-estate-news/sydneys-boomtime-auction-clearance-20130224-2ezb9.html" rel="nofollow">SMH</a> which makes it more obvious that clicking on the image will play a video. Or both.</p> <p>Also you shouldn't break opening things in new window when people hold down ctrl or command key. I updated the <a href="http://jsfiddle.net/Danack/9bg5q/1/" rel="nofollow">fiddle</a> but basically in your click event you need:</p> <pre><code> var isCtrlPressed = e.ctrlKey || e.metaKey; if (isCtrlPressed == true){ return; } </code></pre> <p>I know you said ignore the style, but I prefer it if a placeholder has a background color that is obviously different from the background of the page. If a page is slow loading, I can tell that something is going to load there, rather than it just being a blank bit of page.</p> <blockquote> <p>Does this completely miss the point of deferred loading?</p> </blockquote> <p>Not entirely but it is slightly pointless in this case. Deferred loading is usually used when the thing that is being loaded is very complex (e.g. a massive table) and so would add greatly to the page size, which would make the initial render of the page be a long time after the user followed the link.</p> <p>Although the youtube videos may be slow to load, they shouldn't actually block the rest of the page from loading and rendering in the meantime so deferring loading the videos only gives you a small benefit for quite a bit of work.</p> <p>I guess you should measure how fast someone can view a page, scroll to the bottom and then click to play the last video. If it's faster with the deferred loading, because the other videos flash player isn't loaded then it could still be worth it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload