WPTouch 3.1.1 Search and Menu Buttons Bug Fixes

Using WPTouch 3.1.1? Are the search and menu buttons not working in the mobile view? Just add the following in the Branding | Theme Footer section under Theme Settings: <script type=”text/javascript”> jQuery(‘#search-toggle’).off(); jQuery(‘#search-toggle’).on(‘touchend’, function (e) { jQuery(‘#search-dropper’).toggleClass(‘toggled’); }); jQuery(‘#menu-toggle’).off(); jQuery(‘#menu-toggle’).on(‘touchend’, function (e) { jQuery(‘#menu’).webkitSlideToggle(); }); </script>

Pure Javascript DOM Ready

Yet another a pure Javascript DOM Ready option. The concept was gathered from many options that were considered (in particular from Stackoverflow), which resulted in the below code: (function(f){var t=setInterval(function(){if(document.readyState==”complete”){clearInterval(t);f();}},9);})(); Features: Javascript library independant. Doesn’t pollute global scope. That’s it. 🙂 Usage: var f = function(){ alert(‘Hello, World!’); }; (function(f){var …