Remove Image Size Attributes for Responsive Images in WordPress

WordPress, by default, will add the width and height attributes to image elements. These attributes will override CSS width and height properties. Making images with these dimension attributes responsive is a bit of a hassle, or in some cases cannot be done at all. Strip Image Dimension Attributes from Inserted Images Stripping out the image … Continue reading Remove Image Size Attributes for Responsive Images in WordPress

Automatically Download PDFs via jQuery

Have you ever wanted to have a link to a resource, such as a PDF file, and have that resource be automatically downloaded when the link is clicked? All you need to do is add a download attribute to your link HTML. But wait, the download attribute isn’t supported across all the current browsers! … Continue reading Automatically Download PDFs via jQuery

Disable Links with an Empty href Attribute

Occasionally, there is a need to create a link that doesn’t actually go anywhere. A great example of this is a top-level menu item that displays a drop-down of sub-menu items. In this use case, you simply want a menu item that serves as a container for other menu items, but isn’t meant to take … Continue reading Disable Links with an Empty href Attribute