All The Small Stuff You're Constantly Searching For

Most Recent Articles

Prevent Double Submit on Forms with jQuery

Posted in jQuery, Snippets | 0 comments

The following snippet disables the submit button of all forms in scope of the function after the submit button has been initially clicked. To prevent users from submitting your forms more than once.

How does it work?

When the submit button of the form is clicked, it triggers the form submit function of jquery, then takes the submit handler of the current form and makes it return false so it can’t submit the same form again.

Read More

Equal Column Heights with jQuery

Posted in jQuery, Snippets | 0 comments

The function:

This function loops through each of the elements passed in as parameters and sets each one equal to the tallest element in the group.

Usage:

 

Read More

Zebra Stripe a Table or List with jQuery

Posted in jQuery, Snippets | 0 comments

This snippet lets you strip the even/odd rows of your tables/lists different colors for easier reading:

 

Read More

Enable HTML5 Markup on Older Browsers

Posted in jQuery, Snippets | 0 comments

HTML5 is definitely the future of client-side web development. Unfortunately, some old browsers do not even recognize new tags such as header or section. This code will force old browsers to recognize the new tags introduced by HTML5.

A better solution is to link the .js file to the <head> part of your HTML page:

Source: http://remysharp.com/2009/01/07/html5-enabling-script/

Read More

Convert an Image to Grayscale in HTML/CSS

Posted in CSS, HTML, Snippets | 0 comments

First create a file called filters.svg with the following code:

The CSS:

Read More

Customize UINavigationBar Background Property

Posted in iPhone, Snippets, Xcode | 0 comments

Make sure you replace the two lines that create the UIImages with your image names.
Copy And paste the function into your app delegate right above applicationDidFinishLaunchingWithOptions:
then simply call [self customizeAppearance];  inside your app delegate:

 

Read More

Deselect UITableViewCell on Load

Posted in iPhone, Snippets, Xcode | 0 comments

If you’ve ever paid attention to mail.app in iOS, when you navigate back to the main table view of mail items, the items that you previously selected shows for a second then deselects itself and animates out. Here’s how to do that:

Read More

UITableView Delegate Methods

Posted in iPhone, Snippets, Xcode | 0 comments

UITableViews work better as subclasses of UIViews instead of a stand along UITableView classes. One prime example is with iAds, in order to configure them correctly and have them display at the bottom of your table and not over the last cell, the UITableView needs to be a subview of a UIView class. No need to create a new UITableView subclass just to get the delegate methods. Copy and paste the UITableView delegate methods from below and paste into your classes implementation file:

 

Read More