2

There seems to be some problem with jquery UI buttons in IE 9?

This is how they look normally:

enter image description here

In IE 9 they look like this:

enter image description here

Html of the button is:

        <input
         type="submit"
         name="submit_intermediate_question"
         id="submit-intermediate-question"
         value="Odoslať"
         class="input-submit" >

jquery code:

$(document).ready(function() {

    $('.input-submit').button();

});

Is this a known problem? I am using the latest jquery UI (downloaded yesterday). How to solve it?

Richard Knop
  • 81,041
  • 149
  • 392
  • 552

9 Answers9

3

The CurvyCorners javascript is interfering with the styles declared by jQueryUI.

CurvyCorners is failing because it still calls scanStyles in IE9 even though IE9 supports border-radius ( Support for "border-radius" in IE ) and I suspect that causes conflicts with the existing styles declared by jQueryUI.

http://code.google.com/p/curvycorners/source/browse/trunk/curvycorners.src.js#93 should be:

this.supportsCorners = this.ieVer >= 9.0;

So download curvycorners.src.js, change that line, and use that instead of your current curvycorners.src.js file and the button styles will display correctly.

Community
  • 1
  • 1
Christopher Manning
  • 4,527
  • 2
  • 27
  • 36
2

Your example is working for me in IE9. Check http://jsfiddle.net/tKksD/4/. Make sure you have jquery-ui.css loaded in your header. Then put both your jQuery.js and jQueryUI.js just before </body> closing tag. And lastly put your jQuery code before </body> and after your jQuery.js and jQueryUi.js scripts.

You can also do this by using:

$('input:button').button();

Check working example at http://jsfiddle.net/tKksD/

Or

<button></button>` instead of `<input type"button" />

Check working example at http://jsfiddle.net/tKksD/

Hussein
  • 42,480
  • 25
  • 113
  • 143
1

Try check CSS files and javascript files. You may miss some file.

<link href="{your path to jquery}/themes/base/jquery.ui.core.css" rel="stylesheet" type="text/css" />
<link href="{your path to jquery}/themes/base/jquery.ui.theme.css" rel="stylesheet" type="text/css" />
<link href="{your path to jquery}/themes/base/jquery.ui.button.css" rel="stylesheet" type="text/css" />

<script src="{your path to jquery}/jquery-1.5.1.js" type="text/javascript"></script>
<script src="{your path to jquery}/ui/minified/jquery.ui.core.min.js" type="text/javascript"></script>
<script src="{your path to jquery}/ui/minified/jquery.ui.widget.min.js" type="text/javascript"></script>
<script src="{your path to jquery}/ui/minified/jquery.ui.button.min.js" type="text/javascript"></script>
TaeV
  • 746
  • 12
  • 19
1

Just covering all bases here, but I assume you are using an up-to-date version jQuery? v1.5.1 was the first version to support IE9 as a top level browser. On a related note any vaguely recent version of jQuery UI needs jQuery 1.3.2+ anyway.

andyb
  • 43,435
  • 12
  • 121
  • 150
  • I'm using jQuery 1.4.4 because of compatibility issues with some plugins. – Richard Knop Apr 08 '11 at 15:59
  • Unfortunately I am now away from a PC with IE9 on it now, so can't see the problem. I did notice that your test page has the [Byte Order Mark](http://en.wikipedia.org/wiki/Byte_order_mark) in it which definitely causes IE7 to render in **quirks-mode**. Maybe that is affecting IE9 also? I do suspect that since the version of jQuery you are using does not officially support IE9, it could be jQuery that is the problem. – andyb Apr 08 '11 at 19:23
1

After downloading your test page, getting rid of curvycorners fixed it. Perhaps you could try using another method to get rounded corners.

Chris
  • 4,393
  • 1
  • 27
  • 33
1

Maybe you download jquery and attached scrips locally but url to graphics are relative, so browser can't open images. Try to use firebug for IE in order to check is there is some attempt to download images + you can check if there isn't any error in your js.

Alternativelly IE9 has developer tools, which can be usefull.

Marcin
  • 1,429
  • 8
  • 16
1

I was able to get the button on the page working by unselected some styles marked as inline using IE9 Developer tools. (all the border ones) You can see the inline styles in the image below. I've not tracked down why or where yet but I'll try and do some more investigation later (hopefully today) and update this answer as I get more information. Hopefully this might be of some help for the moment.

Showing it working in IE9

jwwishart
  • 2,865
  • 2
  • 23
  • 26
1

I had similar problem yesterday, just have a look and add closing

   <input
         type="submit"
         name="submit_intermediate_question"
         id="submit-intermediate-question"
         value="Odoslať"
         class="input-submit" /> <--   

I had accordation that did not work because of this.

cpoDesign
  • 8,953
  • 13
  • 62
  • 106
1

Or have a look at IE9 compat. view..

I think it has something to do with doctype aso.

Maybe even something like this:

<\meta http-equiv=\X-UA-Compatible content=IE=edge>