1-866-277-9958

JavaScript

Free Drupal Theme: Jackson (NineSixty Sub-theme)

After weeks of research reviewing the most popular themes on D.O and many group discussions, I finally began the design and development of my first theme to be released to the Drupal community.


Get Drupal help when you need it most! Find hundreds of great tutorials. Track, rate, comment and more. Create Account

If you enjoy our content, please consider subscribing through RSS, so you can read our posts in your application of choice.

Show background image in jquery cycle on IE

jQuery Cycle has a bug in IE 7 and 8 where a white background is added to cycle elements. That will override background images. If your cycle object has a background image and you use the cleartype fix, the background won't show. Cycle has a property 'cleartypeNoBg' to address this issue. Set the property to true.

$('.mycycleclass')
  .cycle({ 
    fx:  'scrollHorz',
    cleartype:  true,
    cleartypeNoBg:  true,
});

More info


Get Drupal help when you need it most! Find hundreds of great tutorials. Track, rate, comment and more. Create Account

Expose server side data from your module for client side javascript use

Adding the following code in any PHP area in Drupal will give you settings values available client-side that you can use when writing JavaScript code.

Pass a key/value associative array to drupal_add_js() and give it type value of 'setting'. Note that I am using an array of arrays with the key of the first array as the name of the module. This is to namespace the settings. This will keep your settings from overriding others and others from overriding yours.

//PHP code in your module or in a PHP snippet anywhere on your site
 
$jquery_settings = array(
  'myModule' => array(
    'mySetting1' => 'myvalue1', 
    'mySetting2' => 'myvalue2' )
);
drupal_add_js($jquery_settings, 'setting');


Get Drupal help when you need it most! Find hundreds of great tutorials. Track, rate, comment and more. Create Account

Writing half-way decent jQuery code

Earlier this week, Stephanie put together a really cool design for our portfolio section on the LevelTenDesign.com Web site. It was based off of a jQuery snippet she found that emulates the Coda slider (http://www.panic.com/coda/).


Get Drupal help when you need it most! Find hundreds of great tutorials. Track, rate, comment and more. Create Account

Java applets

Java Applets are small compiled Java applications that can be run within a web page. Java applets allow the power of a true programming language to be executed on the client-side (note: For security reasons some Java features are not available for applets). Applet's usefulness is extended by their ability to interact with JavaScript.

Typical functions include:

  • Dynamic navigational drop-down and pop-up menus
  • Text manipulation such as scrolling text boxes
  • Advanced graphics animation

Further Reading

Syndicate content
Syndicate content

©1999 - 2011 LevelTen Interactive - Dallas, TX