user1806296 user1806296 -3 years ago 154
jQuery Question

jalert with jquerymobile not working

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?

Answer Source

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>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download