Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jquery mobile和ui不兼容_Jquery_Jquery Ui_Jquery Mobile_Compatibility - Fatal编程技术网

jquery mobile和ui不兼容

jquery mobile和ui不兼容,jquery,jquery-ui,jquery-mobile,compatibility,Jquery,Jquery Ui,Jquery Mobile,Compatibility,虽然我有很多人提到类似的兼容性问题,但他们50%的问题都是在StackOverflow上解决的。我希望我的问题能变成51-49:) 考虑以下代码: <html> <head> <title>Hello, world!</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />

虽然我有很多人提到类似的兼容性问题,但他们50%的问题都是在StackOverflow上解决的。我希望我的问题能变成51-49:)

考虑以下代码:

<html>
<head>
  <title>Hello, world!</title>
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
  <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
  <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
</head>
<body>
  Hello
</body>
</html>

你好,世界!
你好
如果你把这个加载到网页上,你会在浏览器中间得到一个灰色的圆圈,并且没有显示“hello”这个词。在web控制台上,您将看到以下内容:未捕获的TypeError:对象0没有方法“匹配”(Chrome)或TypeError:c.match不是函数(Firefox)或脚本438:对象不支持属性或方法“匹配”(IE)


想在一个页面上同时使用jquery ui和jquery mobile是个坏主意,还是我做错了什么?

唯一相关的是订单,在jUI之后加载jQM,css文件也是一样:

<!DOCTYPE html>
<html>
<head>
  <title>jQM Complex Demo</title>
  <meta name="viewport" content="width=device-width"/>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />    
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
  <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
  <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>    
  <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
    <div data-role="page" id="index">    
      Hello
    </div>
</body>
</html>

jQM复杂演示
你好
您还需要:

<!DOCTYPE html>

这将防止ajax加载程序prom显示:

<div data-role="page" id="index">    
    Hello
</div>

你好
+1用于
。这真是太棒了——简单的生活技巧!:)