The DOM and native browser API’s have improved by leaps and bounds since jQuery’s release all the way back in 2006. People have been writing “You Might Not Need jQuery” articles since 2013 (see this classic site and this classic repo). I don’t want to rehash old territory, but a good bit has changed in browser land since the last You Might Not Need jQuery article you might have stumbled upon. Browsers continue to implement new APIs that take …
Most WordPress themes show user Gravatars in the comment threads. It’s a way of showing an image with the user, as associated by the email address used. It’s a nice touch, and almost an expected design pattern these days.
Every one of those gravatars is an individual HTTP request though, like any other image. A comment thread with 50 comments means 50 HTTP requests, and they aren’t always particularly tiny files. Yeesh.
Let’s lazy load them.
Lazy loading …
One of the big reasons to use jQuery, for a long time, was how easy it made Ajax. It has a super clean, flexible, and cross-browser compatible API for all the Ajax methods. jQuery is still mega popular, but it’s becoming more and more common to ditch it, especially as older browser share drops and new browsers have a lot of powerful stuff we used to learn on jQuery for. Even just
querySelectorAll is often cited as a reason to …
Sometimes you may need to run jQuery code right after all the WordPress content(even scripts) is loaded. Using wp_footer is easy to do it. Just paste the code bellow on your theme’s function.php code and change as desired. ?Download download1.txt1 2 3 4 5 6 7 8 9 10 11 12 13 <?php add_action(‘wp_footer’, ‘wppopflds’, […]
I’m glad to tell you my new plugin Gambit Arrow Custom Front End Translator is available on the WordPress Plugin Directory. A supplement to the qTranslate plugin which also works independently, Translate words written directly on HTML source code, Custom Words Translator for Front End Words on HTML(portuguese, english, spanish), can be customized for other languages […]
It’s very easy to populate a drop down box using XML and jQuery. All you need is a webpage which has a drop down box “#yourdropdownbox”, an XML file and some jQuery code to use in your page. The XML file, I’ll call it “sites.xml”: ?Download download1.txt1 2 3 4 5 6 7 8 9 […]