cordova - js event is not triggering using jquery mobile and phoengap for android -



cordova - js event is not triggering using jquery mobile and phoengap for android -

i developing application using phonegap in eclipse android .i have created folder construction in assets->jquery.mobile folderi have set jquery library files jquery.mobile-1.0rc2.min.js etc.and assets->www folder set html files .i have include jquery library file in html

<script type="text/javascript" src="jquery.mobile/jquery-1.6.4.min"></script> <script type="text/javascript" charset="utf-8" src="phonegap-1.1.0.js"></script> <script type="text/javascript" src="jquery.mobile/jquery.mobile-1.0rc2.min.js"></script>

in html file have written code

<script type="text/javascript"> $( function() { $('body').bind( 'taphold', function( e ) { alert( 'you tapped , held!' ); e.stopimmediatepropagation(); homecoming false; } ); $('body').bind( 'swipe', function( e ) { alert( 'you swiped!' ); e.stopimmediatepropagation(); homecoming false; } ); } );

i have added phonegap jar , set plugins xml file in xml folder can tell problem how resolve it?

thanks

you're missing <\script>

the next index.html runs me. (note, i'm running phonegap-1.3.0 , jquery-mobile-1.0, expect older versions run fine program.)

<!doctype html> <html> <head> <meta name="viewport" content="width=320; user-scalable=no" /> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>phonegap demo jquery mobile</title> <link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.0.css" type="text/css"/> <link rel="stylesheet" href="pgandjqm-style-override.css" type="text/css"/> <script type="text/javascript" charset="utf-8" src="jquery.mobile/jquery-1.6.4.min"></script> <script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script> <script type="text/javascript" charset="utf-8" src="jquery.mobile/jquery.mobile-1.0.js"></script> <script type="text/javascript"> $( function() { $('body').bind( 'taphold', function( e ) { alert( 'you tapped , held!' ); e.stopimmediatepropagation(); homecoming false; } ); $('body').bind( 'swipe', function( e ) { alert( 'you swiped!' ); e.stopimmediatepropagation(); homecoming false; } ); } ); </script> </head> <body > </body>

cordova

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -