Scriptaculous causes jquery ui's slider widget to fail in IE8. Is there a workaround?
Now I've found that, in fact, Scriptaculous also causes an IE8 failure, though with slightly different behavior.
In the below code under IE8, the $j().slider call produces an "Object doesn't support this property or method" error, and the slider widget is not rendered.
(Yes, one moral of this tale might be "don't use prototype and jquery together", but one doesn't always have complete control over one's existing code base...)
Thanks!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js" type="text/javascript"></script>
- <!-- eliminating this reference to scriptaculous resolves the problem -->
- <script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.3/scriptaculous.js" type="text/javascript"></script>
- <!-- jquery built from http://github.com/jquery/jquery/commit/6dfdb14753c66cfd38f8445bd6119ef4a1274d5e -->
- <script src="/javascripts/jquery-6dfdb14.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js" type="text/javascript"></script>
- <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/base/jquery-ui.css" type="text/css" />
- <script type="text/javascript">
- var $j = jQuery.noConflict();
- $j(function () {
- var setupVolumeSlider = function () {
- $j("#volume-slider").slider({
- orientation: "vertical",
- min: 0,
- max: 100
- });
- };
- setupVolumeSlider();
- });
- </script>
- <style type="text/css">
- body { padding: 100px; }
- div#volume-slider { height: 100px;}
- </style>
- </head>
- <body>
- <div id="volume-slider"></div>
- </body>
- </html>