Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
jQuery click event not fired in cordova...
-
Hello,
I’am using jQuery events in my app. Works fine in the browser but when I create a cordova app it does nothing.
Do you have a clue how to debug it with xcode and an ios device? Unnecessary to say, that I’am new to this stuff…
Thank you!
<script src="lib/onsenui/js/onsenui.js"></script> <script src="lib/onsenui/js/angular/angular.js"></script> <script src="lib/onsenui/js/angular-onsenui.js"></script> <script src="//code.jquery.com/jquery-2.2.2.min.js"></script> <script> MyApp = ons.bootstrap(); CRT = new CREATE(MyApp); ons.ready(function(){ $( document ).on( "click", "#menu_home", function() { myNavigator.bringPageTop('view-start.html', {animation: 'fade', animationOptions: { duration: 0.2 ,delay: 0 } } ); slideMenu.closeMenu(); });
-
@Flosef Are you going to use both AngularJS and jQuery? If that’s the case I think you should include jQuery before Angular, otherwise there could be problems because Angular uses some kind of jQueryLite internally.
For debugging, if you are new to this I’d recommend you using Monaca. It provides an awesome debugger application :)