Posts Tagged ‘bugfix’

jQuery on Chrome – Crossbrowser CSS/JS

Tuesday, November 1st, 2011

Today I noticed a small compatibility issue with jQuery on Google Chrome.
When running on Chrome jQuery returns certain CSS properties differently …

After some cross-browser testing I found out that jQuery returns the .css(‘background-image’)
property with quotes on FireFox / Internet Explorer – but without quotes on Chrome.

Just For example, in order to retrieve the URL of a CSS background image:

   bg = jQuery('div#image01')
else {
  bg = jQuery('div#image01')

This might affect other CSS properties as well – I just have faced this one difference until now.