Posts in category: Snippets

One thing that seems like a mystery with WordPress – depending on how you upload your local WordPress site to your remote / live server, every page other than the home page seems to result in a 404. I have no idea why this happens, but the fix below always seems to work for me.…

Read more

Here is a little universal jQuery snippet that will allow you to create an anchor link that can scroll to any div on a page, or the top of the page. Remember to add the jQuery Easing plugin to your project too. Here is the snippet – // click event for scroll button $('.scrollToDiv').click(function(event) {…

Read more

I have seen quite a few plugins around that handle “image captions”, but I thought it could be cool to show how you could create your own custom solutions using a few lines of jQuery. Bear in mind this might not be the best solution for accessibility as alt tags would usually be more descriptive,…

Read more

I recently had to build a WordPress site for a client that was entirely AJAX in terms of navigation. By that I mean  that there is never a page reload when navigating through the site. One of the challenges here was applying the usual “active” class to the relevant navigation link depending on which page…

Read more

UPDATE* If you want to save yourself a lot of hassle, I would recommend using Ghostlab for this. It works incredibly and there’s no real setup involved. —– This one has had me really stumped for the last few weeks. I have been going through the process of making this site responsive, and I was trying…

Read more

jQuery Tools is my favourite UI library. There are certain things that it doesn’t try and do, but what it does do, it does well. I built this gallery as more of an example of how flexible jQuery Tools components can be. Imagine you have a website that needs a jQuery tab system, and then…

Read more