Category Archives: jQuery

Using jQuery to expand a text box on hover

Let’s say you have limited space on a page so you want to display blocks of content which expand when hovered upon, as shown below. The boxes expand when hovered, with a slight delay when hovering off to aid in … read more >>

Preventing duplicate event handlers in jQuery

I was working on some plugin development lately and ran into an issue where I needed to remove any event handlers already attached to an element before attaching a new one. I found the easiest way to do this was … read more >>

Multiple Flexsliders causing a weird background flash/flicker

I don’t often use many jQuery plugins, I like building custom widgets and plugins myself – it’s way more fun!  But time and budget doesn’t always allow that, and with the demand for responsive sites these days a great little … read more >>

How to link two jQuery UI sliders together

I recently used jQuery UI sliders on a project and had to link them together so that the value of one couldn’t be greater that the value of the other, and the value of the other couldn’t be less than … read more >>

Use jQuery to grab the absolute path of a relative image

Good old jQuery has a function for everything it seems.  I was trying to obtain the absolute source path of an image which was linked relatively (eg: ‘/imgs/godsavethequeen.png’) but jQuery gives you just that – the relative path. Sure you … read more >>

How to split a dynamic list into two equal columns using jQuery

Let’s say you have a dynamically generated list.  You don’t know how long this list will be, but you want it to be displayed in 2 columns rather than just one.  An example could be a list of posts in … read more >>

Targeting a specific word using JavaScript and jQuery

Ever needed to target a specific word in a paragraph?  Using a little jQuery you can do just that… Say you have the following paragraph of text: John Ipsum rule britannia lorem fish and chips ipsum going to the loo … read more >>

IE doesn’t like jQuery’s $(‘title’).text(var);

Changing the title of a web page on the fly can be useful for a bunch of reasons. Say you’re creating an app using jQuery for example and using a single page to house content which might be different depending … read more >>

Centering an element using jQuery

After you have a good grasp on both HTML and CSS you can create some great websites, but what if you want your website to do more?  To really build websites which are dynamic on the front-end and powerful on … read more >>