Software Engineering in WordPress, PHP, and Backend Development

Tag: JavaScript (Page 10 of 12)

Articles, tips, and resources for JavaScript-based development.

Quick Tip: Including jQuery in WordPress The Right Way

Much has been said on the subject of properly registering and enqueueing scripts in WordPress, so I hate to write yet another “including jQuery in WordPress the right way” post, so I’ll attempt to cover it from a different angle.

Because jQuery ships with WordPress, it’s really just a simple matter of making sure you call:

wp_enqueue_script( 'jquery' );

In your functions.php file.

But that’s really only half of it. After that, you have a matter of actually setting up your JavaScript source.

Continue reading

Using jQuery Confirm To Enhance Your User Interface

When it comes to building themes, plugins, and other projects on top of WordPress, I think there is room for improvement when it comes to introducing basic user interface principles.

For example, I’ll be the first to admit that there are certain things I know – such as make users confirm before completing a destructive action – that I’ve not always done regularly.

I’m significantly better at putting these things in place now than I once was, but it’s little details like this that can really set your work apart from others and that can enhance the user experience. Not to mention, a lot of this stuff is backed by research in psychology.

Anyway, I’m all for sharing various tools and utilities that help make our lives as developers a bit easier especially when it comes to improving our user interfaces.

jQuery Confirm is one such plugin.

Continue reading

Giveaway: jQuery Cookbook First Edition

The comments on this post are now closed.

A few years ago, when I was really getting into JavaScript and jQuery, there were a number of books I read that really helped level-up my skillset. Some of the books, I’ll hold on to as I constantly reference them; others, I’ve shared with local developers.

Last weekend, I stumbled across my copy of  jQuery Cookbook. When I read this a couple of years ago, it really helped to introduce some of the more professional-level ideas and capabilities of jQuery rather than just how to use it.

But I’m done with it. It’s still in great condition, but I’d like to give it away to one of you guys.

Continue reading

Simple Country, State, and City CSV’s for Download

If you're only interested in the files and without implementation details, then you can grab them.

Every now and then, I end up working on a project that requires a form that includes county, city, and state information. More often than not, the client doesn’t about the rich data associated with any of the above – that is, they’re not particularly interested in latitude, longitude, population, or even zip code.

Simply put, they want the user to be able to select their country, select their city, and then select their state from a predefined list of options.

For the past couple of projects, I’ve been using three, very simple CSV’s for this and thought I’d share them here should anyone else want to use them. Additionally, I thought I’d share a simple implementation of how they can be used in WordPress projects.

Continue reading
« Older posts Newer posts »

© 2024 Tom McFarlin

Theme by Anders NorenUp ↑