问题
I'm trying to get the jQuery Mobile events(https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.event.js) to work as a standalone "plugin" but I can't seem to figure out what I need to change.
I know this is possible because I used this: https://gist.github.com/743400 in the past and it worked... that file is based on beta or even alpha release of JQM and I would like to use the latest... any ideas?
回答1:
Update You can now build a custom package for jQuery mobile 1.2 http://jquerymobile.com/download-builder/ and select the Events that you need for your project
The following worked for me for jquery mobile 1.1-stable branch:
- clone the repo from github https://github.com/jquery/jquery-mobile
- git checkout 1.1-stable
- edit the Makefile on line 131 https://github.com/jquery/jquery-mobile/blob/1.1-stable/Makefile#L131 to build jquery.mobile.event instead of jquery.mobile
- run
make jsto compile the modules necessary for events - the built versions will be available in the
compiled/folder
来源:https://stackoverflow.com/questions/9417624/jquery-mobile-events-standalone