how to fix closure compiler error on css({ float: 'left' }) [duplicate]

Tags: javascript,jqgrid,css-float,google-closure-compiler

Problem :

Possible Duplicate:
Google Closure Compiler parse error: invalid property id for css({float:'left'})

I tried to use closure compiler from

to compile code

// ==ClosureCompiler==
// @output_file_name default.js
// @compilation_level ADVANCED_OPTIMIZATIONS
// ==/ClosureCompiler==

css({ float: 'left' })

but got error

JSC_PARSE_ERROR: Parse error. invalid property id at line 1 character 6
css({ float: 'left' })

How to fix it? This code is used in Oleg jqGrid createContexMenuFromNavigatorButtons method posted in stackoverflow answer.

Solution :

float is likely to be recognized as a reserved word (although it isn't, it was in ES3), so it should be safe to use

css({ "float": "left"})

    CSS Howto..

    How to load an image with css using Django

    How to make full window canvas in GWT?

    How to remove the arrows in a scroll bar through CSS

    CSS transition: how to produce this effect (linking transitions)

    How to override height

    How do I make
  • with block elements sit beside each other?
  • How do I add a CSS class to an element from CSS (not jquery nor javascript)?

    CSS: How to decrease the margin of my paragraphs inside a div?

    how to layout tictactoe with html and css on a webpage

    How to align buttons below and right-aligned to a HTML list?

    How to add space between inline-block elements?

    How to set a default location of a scrollbar

    How to set icon of an page using CSS

    CSS / Javascript: hidden div does not take full width after being shown

    How to set style for n-th td in a table using css

    How to make the green DIV fit right after 2 upper divs?

    How to create an image sprite that stretches both horizontal and vertically as a single image?

    How to make hidden div slide down without affecting other elements in same row

    How to implement a finished coded html/css page into CMS [closed]

    How to align Navbar at bottom of window, but have content under this in CSS?

    Javascript: How do I check a css style and then change another css style?

    How to add different CSS3 hover transitions on hover out with CSS

    how to affect an element's width by one child element but not others using CSS

    CSS - How to align content to middle using bootstrap?

    how to use 'selector gadget' to scrape data into R?

    How to correctly display HTML page in browser and mobile

    How to make a div 100% accross

    CSS - How to resize texboxes with background image when browser is resized?

    How to center Nav Bar CSS

    How to create new
  • not affected by SOME css styles