Using square bracket notation for keyword

This commit is contained in:
Ian Gilman 2013-01-29 10:06:39 -08:00
parent bd474d32a7
commit c6597213a1

View File

@ -66,10 +66,17 @@ $.Navigator = function( options ){
style.fontSize = '0px'; style.fontSize = '0px';
style.overflow = 'hidden'; style.overflow = 'hidden';
style.border = '2px solid #900'; style.border = '2px solid #900';
//TODO: IE doesnt like this property being set //TODO: IE doesnt like this property being set
//try{ style.outline = '2px auto #909'; }catch(e){/*ignore*/} //try{ style.outline = '2px auto #909'; }catch(e){/*ignore*/}
style.background = 'transparent'; style.background = 'transparent';
style.float = 'left'; //Webkit
// We use square bracket notation on the statement below, because float is a keyword.
// This is important for the Google Closure compliler, if nothing else.
/*jshint sub:true */
style['float'] = 'left'; //Webkit
style.cssFloat = 'left'; //Firefox style.cssFloat = 'left'; //Firefox
style.styleFloat = 'left'; //IE style.styleFloat = 'left'; //IE
style.zIndex = 999999999; style.zIndex = 999999999;