Software Engineering in WordPress, PHP, and Backend Development

Tag: JavaScript (Page 8 of 12)

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

A Quick Fix For Google Web Font Rendering

Like many, Chrome is my browser of choice, but the past couple of updates have resulted in some problems specifically with Google web font rendering (as well as some other web font rendering).

I had considered linking to a number of different issues that I had seen in bug trackers, but you can see just how popular this particular issue has gotten by performing a quick Google search.

To be honest, I’m not sure if this is relegated only to Chrome or to all WebKit-based browsers.

Anyway, since Chrome normally does silent version updates in the background, this should be fixed in an upcoming version – last I checked, it was resolved in the latest build of Chromium – but until then, I thought it may be worth sharing one way to fix the issue.
Continue reading

How To Check if a Page Is in an iFrame

iframes aren’t exactly the most widely used browser technology anymore, but that doesn’t meant that they don’t have their place, especially in WordPress development.

For those of you who have worked with features such as the Theme Customizer, then you are certainly familiar with how the feature is structured and the role that an iframe plays in giving you the controls and preview of the theme as you’re making changes.

Although it may not be terribly common, there are times in which you may need to check if a page is in an iframe.

There are a variety of reasons in which this may need to be done (dynamically adjusting the height or width of an element on resize, for example), and it’s really easy to do with a little bit of JavaScript.

Continue reading

My Recommended JavaScript Books

When it comes to learning JavaScript, I’m occasionally asked what books I recommend. Some of these come from those who are just getting into the language; others come from people who have been programming for sometime.

For whatever it’s worth, I don’t consider myself an expert in JavaScript, though I really do like working with the language. I also love seeing its adoption over the web, and some of the technologies that have emerged that make it possible to write both client-side and server-side applications.

Anyway, so when it comes to JavaScript, there are two books that I always recommend to both beginners and novice programmers alike.

Continue reading

Get An Input Element’s Type with jQuery

In a recent project, I’ve been working with large groups of input elements, and the course of action that’s taken depends on the type of element that raises the event.

Since so much of the project uses jQuery, I opted to write an extremely simple plugin that makes it easy to get an input’s type by calling a function on said element.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑