Professional Drupal web development, site management, and web applications.
» jquery

jquery

DataTables (table plug-in for jQuery)

My new favorite jquery tool for data table sorting and searching.

Excellent tool with as little or as much configuration as you'd need for most any project. Very slick.

Tom Coote Web Development

File Style Plugin for jQuery

Used this to commit horrible usability crimes at the client's request. Shame.

Visual jQuery 1.2.6

jQuery UI - Home

jQuery: The Write Less, Do More, JavaScript Library

Where and How to Start using jQuery to Enhance your Drupal Site (jQuery Mini-series)

Where and How to Start using jQuery to Enhance your Drupal Site (jQuery Mini-series Part 3 of 3)

If your are not a jQuery dev, don't worry, there are plenty of excellent resources to get you started using jQuery to enhance your site.

Star here

http://drupal.org/project/Modules/category/101 ( Drupal Modules: JavaScript Utilities )

Then simply:

  1. Browse
  2. Download
  3. Install & Configure

Some module which I recommend checking out

UI Improvements

Content Browsing

Photos

Theming and Display

jQuery Plug-in Management

Read More »

Drupal Best Theming Practice for where to put JavaScript (jQuery Mini-series Part 2 of 3)

In D6, you can put a .js file in your base theme directory and it will automatically be loaded by Drupal.

You can also include a js file via an entry in your theme’s .info file:

scripts[] = your_javascript.js

However, I recommend the following:

Consider your JavaScript theme-able like HTML.

  1. It should be able to be themed
  2. Put JavaScript in .js file
  3. Use drupal_add_js() in a theme function
  4. If in a module, call it with hook_init()

As HTML in a theme function / tpl file, calling your JS with a theme function allows theme developers to modify or override your JS in the theme layer.

Here it is in a module:

<?php
/**
 * Implementation of hook_init()
 */
function trickoutmysite_init() {
 theme('trickoutmysite_javascript');
}
 
/**
 * Implementation of hook_theme()
 */
function trickoutmysite_theme($existing, $type, $theme, $path) {
  return array(
    'trickoutmysite_javascript' => array(
      'arguments' => array(),
    ),
  );
}
 
/**
 * A themable function which uses drupal_add_js to include the js file
 */
function theme_trickoutmysite_javascript() {
  drupal_add_js (drupal_get_path('module', 'trickoutmysite') . '/trickoutmysite.js');
}
 
?>

Read More »

When to use jQuery on your site (jQuery Mini-series Part 1 of 3)

Use jQuery to Enhance Site UI, Display, or Interaction

jQuery is an excellent tool for improving your site’s interface. It’s also helpful to target and change specific CSS and HTML elements quickly. [1]

I tend to use it mostly for UI (user interface) enhancements or when there is a semi-dynamic event in the display, after the page has loaded.

Examples uses include:

  • User feedback in messages
  • Tool tips (in-context user guidance)
  • Enhanced image/gallery display
  • Tabs for quick access to hidden information
  • As a style sheet switcher (helpful with accessibility)
  • Form enhancements and client-side feedback
  • Menu enhancements
  • Data entry such as a date picker
  • Table and data sorting
  • Media players
  • Content flagging
  • Tagging (better input methods)
  • Loading additional content without a page refresh
  • Dynamic Charts
  • Content Carousels (albums, photos, headline news stories)

Do Not Use jQuery as the Primary Driver for Site UI, Display, or Interaction

jQuery should not be used as the primary driver of your site’s display and not as a cornerstone of any primary functionality for your site.

In other words, sure, enhance your web sites e-commerce process with jQuery, but have it:

  1. degrade gracefully,
  2. making sure people may still go through the e-commerce process,
  3. even if jQuery fails completely.

Simple uses can have big impact

When consider the rendering of display effects such as rounded corners and color gradients, consider CSS instead.

Read More »

45+ New jQuery Techniques For Good User Experience | Developer's Toolbox | Smashing Magazine

Syndicate content