Javascript method - sinsunsan/archiref_wiki GitHub Wiki
- hasOwnProperty
Allow to test if an object has a given property
if (data.hasOwnProperty(fieldName)) {
/* Do something */
}
- Optional parameters
http://www.markhansen.co.nz/javascript-optional-parameters/
timer
Good blog post to understand timer
http://ejohn.org/blog/how-javascript-timers-work/
- setTimeout
Trigger something after having waited a time defined in millisecond
setTimeout(function() { $('#rue89-register-username').find('input').focus(); }, 10);
after 10 ms, give the focus to input element inside #rue89-register-username element
- setInterval
Trigger something every xxx time in milsecond