jalert with jquerymobile not working

蹲街弑〆低调 提交于 2019-12-24 15:08:30

问题


I want to use jAlert in my jquery mobile project.

Below is my code. Directory structure is perfectly fine.

 <link rel="stylesheet" href="libs/jquery.mobile-1.3.2.min.css" />
 <script src="libs/jquery-1.9.1.min.js"></script>
 <script src="libs/jquery-ui.min.js"></script>
    <!-- Core files -->
 <script src="libs/jquery.alerts/jquery.alerts.js" type="text/javascript"></script>
 <link href="libs/jquery.alerts/jquery.alerts.css" rel="stylesheet" type="text/css"            media="screen" />

 <script src="libs/jquery.mobile-1.3.2.min.js"></script>

I am getting following error.

"Uncaught TypeError: Cannot read property 'msie' of undefined "

Am I missing something?

How to use jAlert with jQueryMobile any example?


回答1:


According to $.browser API, $.browser.msie will not work with jQuery 1.9 or later, unless jQuery Migrate Plugin is included.

Demo

All you need is adding the below in <head>.

<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>


来源:https://stackoverflow.com/questions/18530791/jalert-with-jquerymobile-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!