Every jQuery Selector

The main purpose of these selectors is to select elements on a web page that meet certain criteria. The criteria can be anything like their id, classname, attributes or a combination of any or all of these. Most of the selectors in jQuery are based on existing CSS selectors but the library also has its […]

Read More

Caching Returned Elements

When you have to use the same selector many times, it is much better to cache the returned element(s) in a variable. This will avoid multiple scans and improve performance. As an example: can be written as: This way the browser only has to scan the document once rather than three times. Even though the […]

Read More

WordPress Publish Post Hook

One of the best parts of WordPress is its hook/action system; this special hook system is WordPress’ way of assigning callbacks when certain events occur. One event that there seems to be a lot of confusion over is which hook to use to detect when a post is initially published. There’s the publish_post hook but […]

Read More

Add Custom CSS to WordPress Admin

Step 1: Create Your CSS File You can place the CSS file wherever you’d like; I’ve chosen to place the CSS file within my theme. My admin CSS file looks like: The CSS above makes tags more visible. It also will make any PRE element without a class more apparent, teling me I need to […]

Read More