Cannot start jQuery Mobile without jQuery. (which is for people who may come here and not know this already)
You can try to reduce the size of JQ and JQM. Unfortunately, I do not think there is much to remove from jQuery. I will let him think and edit;)
But you can clear jQuery Mobile because it consists of widgets. Get JQM from github, read about βcompilingβ, and you'll find out what to do. I plan to do the same, so I'm pretty sure it can be done. If you are not using selectboxes, you can simply remove the widget from the manifest file, and after making it, the CSS and code should not get into the assembly. That way, you can easily squeeze JQM down (my guess) by about half the size, if you don't use any form elements, collapse lists, etc., And the basics should work anyway.
[edit]
Possible jQuery compression will be difficult , but you can try removing:
- new pending ajax processing (if it is not too deeply integrated)
- animation
- $. css (maybe I'm not sure if JQM uses this or not, but this is a big piece of code, and you can do without it)
The best way to do the recycling is to replace the body of the function, which, in your opinion, you will not need, with alert('damnit!') , To see if you really need it;) To be sure that it remains functional and stable , you must replace the functions associated with the names. Try not to replace or remove any closures or functions that return functions.
And do it AFTER AFTER YOUR TESTED code so that it always works correctly. Repeat tests after spoiling J *
source share