In this post I'm going to look at how to find which tables in a MySQL database a string is referenced, and how to to replace all instances of that string using MySQL's replace function.
jQuery's animate function allows you to create movement effects of page elements using their CSS selector. One of the parameters for the animate function is 'easing' which allows you to control the type of movement. By default, the easing effect will be set to 'swing', the only other option available with the jQuery core is 'linear', however adding jQuery UI opens up a whole load more options. This article takes a look at what's available and how to use it.
Forcing a scrollbar on your web site can prevent that 'jumpy' effect when some pages have one but others do not when the content isn't deep enough. This short code snippet will help to keep all the pages consistent:
In the old days, alternating the background colour in a list item would involve adding alternating classes with different background-color properties applied. With CSS3 this can now be achieved with the nth-child selector.
So I noticed some odd jQuery behavior the other day. When using the .removeClass() method it leaves behind an empty 'class' attribute title which is both unnecessary and invalid code (were you to run this through a validator you would get "CLASS" is not a member of a group specified for any attribute). This code snippet looks at how you can get rid of the empty class attribute after using the jQuery removeClass method.
This article looks at using jQuery unbind to remove a click event after the first click. As an example we'll be creating a simple search box the gets displayed on first click and would do the search on second click.
Sorting arrays in PHP is easy with several built in functions to cater for different re-ordering methods.
The following code snippet is a quick and easy way to selectively create a list from options in a secondary multiselect box. As it's multiselect you'll be able to move more than one option to the other list at the same time.
Code snippet for retrieving a child class name from the parent without the namespace.