Blog

Recent Blog Posts

Thanks for visiting! If you're new here, you may want to subscribe to our RSS feed or Subscribe to Email update. You will find all kinds of things about technology here!

Ajax Framework Market Share

2007 Ajax Tools Usage Survey ResultsLast week Ajaxian and Burton Group’s Richard Monson-Haefel conducted a survey amongst Ajax developers. It showed that more and more developers are using Ajax frameworks instead of hand-coding Ajax. Although the total number of frameworks has increased, there is a limited number of frameworks that is really popular.

What is astonishing is the nearly complete lack of commercial Ajax frameworks. Backbase has had a lot of success making a comeback after loosing some market share in 2006, but other commercial Ajax frameworks have not been so lucky.

If you enjoyed this post, make sure you subscribe to my RSS feed!


Loading custom Javascript Libraries in Wordpress Themes with wp_enqueue_script()

Since reading Nick’s entry on Loading Javascript Libraries in Wordpress Plugins, I have decided to use the same techniques to get my custom Theme to load JavaScript using wp_enqueue_script().

There is two reasons why I wanted to load my custom JavaScript libraries:

  1. Default jQuery library included with the latest version of WordPress is not up-to-date
  2. My custom code does not work with the default version included with this release WordPress

As this is a custom theme I have a functions.php where I have defined all my custom functions. So to load the custom JavaScript.

< ? php
function my_add_js_libs() {
//Add the jquery framework to the header
//wp_enqueue_script('jquery'); // default jquery is not up-to-date
//wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false );
wp_enqueue_script('my_jquery', $src = '/wp-content/themes/[mythemename]/js/jquery-1.2.1.pack.js’, $deps = array(), $ver = ‘1.2.1′ );
wp_enqueue_script(’my_core_js’, $src = ‘/wp-content/themes/[mythemename]/js/core.js’, $deps = array(’my_jquery’));
}
? >

then make a call to the function in the header.php just before the wp_head();

< ? php
my_add_js_libs();
wp_head();
? >

This should now load the custom JavaScript Libraries required for your themes in the sequence that WordPress decides.

If you enjoyed this post, make sure you subscribe to my RSS feed!


Feedback Form