jQuery Topics

Create a Stylesheet Switcher with jQuery and PHP

James Padolsey shares an excellent tutorial at nettuts on how to create an amazing jQuery stylesheet switcher. Enabling your visitors to switch styles on the fly is great for delivering custom or specialty interfaces. Some good examples of use:

  • Provide visitors with a simplified, highly usable theme (large fonts, strong contrast, etc.)
  • Create separate themes for “night” (dark design) and “day” (lighter design)
  • Provide “themed” interfaces based on mood, character, etc.

The tutorial explains each of the following steps in good detail, making it easy to understand and follow along:

  1. The HTML
  2. The CSS (two different layouts provided: “day” and “night”)
  3. Small PHP snippet
  4. The jQuery

The style switcher built in this tutorial is easy to implement, unobtrusive, and completely degradable. Cookies are used to remember the user’s preference, and best of all, the jQuery is used to progressively enhance the switcher, which works perfectly fine with JavaScript disabled. jQuery is used to enhance the switching functionality with a smooth, fading transition effect between styles. It also enables the styles to be switched without a page refresh.

In short, 100% awesome. I look forward to using it for my next theme at my personal site, Perishable Press.

Demo

Documentation

Download

Read more

Pagination with jQuery, MySQL and PHP

Srinivas Tamada over at 9Lessons comes through with yet another concise, no-frills tutorial on how to implement pagination with jQuery, MySQL, and PHP. As is custom at 9Lessons, the tutorial is aimed at those who already familiar with the fine art of web development and focuses on providing only the code required to get things done. As they say on the big screen, “just the facts, ma’am.”

This highly useful tutorial includes the following components:

  1. Database configuration (table creation)
  2. JavaScript code
  3. Three PHP scripts
  4. And some CSS

Looking at the demo, everything looks nice and tight — a good implementation of Ajax-style functionality for pagination.

Note that this technique does no degrade gracefully — JavaScript is required in the user’s browser for pagination to work.

Demo

Documentation

Download

Read more

jQuery Resources

Learn more about jQuery

jQuery News & Links

In today’s post we have included lightbox scripts/plugins from several JavaScript libraries: jQuery, MooTools, Prototype. These stylish lightbox scripts/plugins can ...

Just like Google Translate, jQuery plugins can be used to the same effect when it comes to having your own ...

We’re ready for our next round of community input, this time for version 1.8! This is your chance to suggest ...

The jQuery smoothAnchor Function provides you with a lightweight script that can make your in-page anchor links smooth scrolling. There ...

Here in the United States, we’re celebrating Thanksgiving this week. For those of you living elsewhere in the world, it’s ...

We all know that HTML5 is a new web technology led by Apple and it will be the next big ...

Today while we were searching for a decent plugins to share on the blog we stumbled across some jQuery plugins ...

TL;DR The body responsible for overseeing jQuery’s finances and administration, which was until today known as the jQuery Team, is ...

More and more Developers and Designers and have been using WordPress these days. Combining WordPress CMS with the power of ...

Just to let you know we’re not asleep at the switch around jQuery Central, we’ve got a new preview release ...

It seems everyone is asking this question lately! What do these lightbox/thickbox/fancybox/colorbox jQuery plugins have in common and what are ...

We’ve posted tons of jQuery Navigation Menu plugins for your websites and blogs and now we are giving you another ...

It can be very time consuming to make your jQuery code neat and tidy. Fortunately, there are online tools and ...

As a developer you may want to share your code on your website or blog (just like us!). There are ...

Hi guys, just a quick post to show you how to add custom messages to your code snippets that you ...

This is very useful for loading mutiple scripts with a callback function containing code that you want to run only ...

Here are 2 options to quickly view all the JavaScript used on a web page. Could come in handy when ...

This is how you can load the jQuery library using plain JavaScript. As the load takes place asynchronously so i’ve ...

jQuery Summit 2011 It’s that time of the year again (no, not Christmas!, something almost better!) – the annual (online) jQuery ...

The jQuery Slider can play a very important role when it comes to grabbing attention, displaying images & saving space ...

More Links & News

Community Resources

Use jQuery and the Google Maps API to create your own map application.

Super cool and easy way to get stylish tooltips with jQuery.

The right way to include the jQuery library in WordPress.

Share a resource