问题
I am trying to build a mobile application with Cordova and I have chosen the framework named "framework7". In the application I have HTML page have textboxes time, when the user clicks on the textbox clock picker will be display (clockpicker jquery plugin) Now the main issue is that the framework7 doesn't allow the jquery plugins to work with it can anyone help me
回答1:
ofcourse jquery works with cordova i used jquery for all my app that i wrote with cordova .dowload jquery and add your project.and u should be careful where u write, u need to write it before framework7.js because it uses it
this is my general usage i added jquery.js that i downloaded to lib folder
<script src="cordova.js"></script>
<script src="scripts/platformOverrides.js"></script>
<script src="lib/jquery-1.11.3.min.js"></script>
<script src="lib/framework7.min.js"></script>
<script src="lib/my-app.js"></script>
<script src="scripts/index.js"></script>
<script src="scripts/Home.js"></script>
回答2:
You must run it on initpage on each js function
回答3:
You have to write all your your short jQuery function inside the myApp.onPageInit(' ', function(){});
Other wise the jQuery code will not work properly
来源:https://stackoverflow.com/questions/35590464/how-use-plugin-jquery-in-framework7