HTML5: Javascript shiv library

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 […]

Javascript: functions, apply, call, and context. prototype and Constructors.

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 […]

General: Interview questions

Front End (JavaScript): 1) Difference between setTimeOut and setInterval. setTimeOut will call the function in order just once, setInterval will call it multiple times. The latest Firefox will only call once per second. Since what happens in the called function may take longer to execute than the next time interval, it is recommended to use […]

CSS3: Background gradients

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 […]