I use Stack Overflow a ton, and I’m going to try to make more of an effort to contribute.
I was having trouble scrolling horizontally with the iscroll plugin, and I solved it by enabling the hScroll option (which I thought should have been enabled by default). I use iscroll’s zoom function to enable zooming on a single div, while the rest of the page does not zoom.
I had difficulties getting Thomas J Bradley’s HTML5 Signature Pad to let me to use its API without resetting the field. This Github issue explains a workaround:
He is saving the signature, declaring the api variable, then regenerating the signature.
I needed to use the .getSignatureImage() api function which allows me to turn the signature into a base64 string so I could store the signature in a database.
The page linked above describes the process of adding inline HTML to PHP code instead of echo '<html>';. It seems like it’s much faster to not process each echo statement with PHP.
This is definitely a big “oh!” moment for someone still learning PHP.
Without modification, Phonegap will wait for a “double-click” after the user taps. This results in a noticeable delay. With the plugin above included, it removes the delay.
Other plugins I tested wanted me to use selectors for each element I didn’t want delayed.
I’m really impressed with sisyphus.js and its usage of HTML5 localStorage. It makes it so users won’t need to re-enter data into a form when they close the window.
It’s super easy to implement, you only need to include the following in your header:
The following code makes it so I don’t have to mention specifically what page needs to load before a script runs. This is good for having the same function on several different pages in Jquery Mobile.
That is not loading jQuery. It fetches whatever a random domain returns and echoes it straight into the page on every request. The error was just the malware host returning its own 404, printed onto the page in place of the usual payload (normally spam links or hidden SEO content). It rode in on a nulled “Pro” copy of All in One SEO Pack.
Pointing $url at the real code.jquery.com doesn’t fix anything, it just dumps the jQuery source as text onto the page, because the code echoes the response body instead of loading a script. The only real fix is to remove the nulled plugin and install the official free version from the WordPress plugin directory.
Watch out for this pattern: nulled (pirated) WordPress plugins routinely ship with a fetch-and-echo injector disguised as a jQuery loader. Sucuri has a good breakdown in Fake jQuery Scripts in Nulled WordPress Plugins, and All in One SEO publishes its own warning about nulled copies. A free “Pro” plugin isn’t free; the price is remote code running on your server.