IE doesn’t understand, and doesn’t know how to render the newest HTML5 elements. But if there is a “document.createElement(‘section’)”, you will be able to display now section element in IE old browsers, and even style it. shiv library does that for you. In those cases, this is what you need: https://github.com/aFarkas/html5shiv/ Along with this: <!–[if […]
Everytime you call a function, an arguments property object gets generated. You can call it directly to see how many arguments you have passed to the function: arguments.length Remember that arguments is not a real array, even though it behaves like one, but you can always use the power of prototype and apply to make […]
While loop: var currentNumber = 0; while (currentNumber
To convert variable types in JS: Boolean(value) – casts the given value as a Boolean Number(value) – casts the given value as a number (either integer or floating-point) String(value) – casts the given value a string
As an arithmetic operation, use it to find out if a number is divisible by another one, with no reminder afterwards. Basic stuff, but important.
Scripting to make up for missing CSS or HTML features in legacy browsers. Not ideal, but sometimes necessary.
jasmine.yml Basic one, I should have known. Making sure I will not forget…
background: #0000FF; /* for non-css3 browsers */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=’#3399CC’, endColorstr=’#0000FF’); /* for IE */ background: -o-linear-gradient(#333366, #eee 50%, #99CC99); background: -webkit-gradient(linear, left top, left bottom, from(#000), to(#FFF)); /* for webkit browsers */ background: -webkit-linear-gradient(#333366, #eee 50%, #99CC99); background: -moz-linear-gradient(top, #333366, #eee 50%, #99CC99); /* for firefox 3.6+ */ height: 100%; /* To ensure the entire […]