Fully responsive HTML5 video

Use width and max-height on the <video> element:  Run code snippetExpand snippet http://jsfiddle.net/fHG69/ Also, you’re missing a semicolon after background-color. When absolutely positioning an element to fill the screen, I prefer to set top, bottom, left, and right instead of setting height and width.

What is the non-jQuery equivalent of ‘$(document).ready()’?

This works perfectly, from ECMA. The snippet is all you need, but if you want to dig more and explore other options check this detailed explanation. The window.onload doesn’t equal to JQuery $(document).ready because $(document).ready waits only to the DOM tree while window.onload check all elements including external assets and images. EDIT: Added IE8 and older equivalent, thanks to Jan Derk‘s observation. You may read … Read more

stopPropagation vs. stopImmediatePropagation

stopPropagation will prevent any parent handlers from being executed stopImmediatePropagation will prevent any parent handlers and also any other handlers from executing Quick example from the jquery documentation: Note that the order of the event binding is important here! Show code snippet

how to define variable in jquery

jQuery is just a javascript library that makes some extra stuff available when writing javascript – so there is no reason to use jQuery for declaring variables. Use “regular” javascript: EDIT: As Canavar points out in his example, it is also possible to use jQuery to get the form value: given that the text box … Read more