[plugins] jQuery Colorbox 3.5

I released the new version 3.5 of jQuery Colorbox today. Check it out :-)

Get it here.


3.5 (2010-06-16)

  • NEW: Ukrainian translation by Yuri Kryzhanivskyi
  • NEW: Italian translation by Erkinson
  • NEW: Hebrew translation by Tommy Gordon
  • BUGFIX: URLs are now generated correctly for WP-MU installations
  • NEW: Added latest donations and top donations to settings page

[plugins] jQuery Colorbox 3.4

I released the new version 3.4 of jQuery Colorbox today. Check it out :-)

Get it here.


3.4 (2010-05-24)

  • NEW: Colorbox is not applied to image links that have the class “colorbox-off” any more. Useful for NextGEN users.
  • NEW: Dutch translation by Richard van Laak
  • NEW: Malay translation by Saha-ini Ahmad Safian
  • CHANGE: Added CSS id “colorboxLink” to link in Meta container.
  • CHANGE: Modar Soos updated the Arabic translation

[plugins] jQuery Colorbox 3.3

I released the new version 3.3 of jQuery Colorbox today. Check it out! :-)

Get it here.


3.3 (2010-05-05)

  • NEW: Belorussian translation by Marcis G.
  • NEW: Russian translation by Drive2Life.ru
  • BUGFIX: Screenshot for Theme#10 is now displayed correctly.
  • NEW: Added Theme#11, a modified version of Theme#1.
  • BUGFIX: Theme#7,9 and 11 will work in Internet Explorer 6 now.
  • CHANGE: Minified CSS and JavaScript
  • NEW: registered link to plugin page in WordPress Meta widget

[plugins] jQuery Colorbox 3.2

Today, I released a new version of my plugin. It is now working for NextGEN galleries! :-)

Get it here.


3.2 (2010-04-20)

  • NEW: Added theme#10, thx to Serhat Yolaçan for all the hard work! (CSS3 rounded edges, IE does not support that)
  • CHANGE: jQuery Colorbox plugin now adds necessary CSS class to all embedded images.
  • CHANGE: jQuery Colorbox plugin is now compatible to NextGEN Gallery
  • CHANGE: Vedran Jurincic updated the bosnian translation
  • NEW: Arabic translation by Modar Soos

[How To] Load Javascript in WordPress

If your WordPress plugin or theme uses JavaScript, it is essential to know how to include it so that you don’t break other JavaScript libraries or plugins/themes that use JavaScript.

The straight forward way to load JavaScript is of course to embed a script tag with the JS file as a src attribute:

<script src="my-plugin/js/jquery.js"></script>

Of course you can load your own custom JavaScript that way, but don’t do that if you are loading a JavaScript library! Check the list of JavaScript libraries supplied by WordPress. Do not include a library with your theme/plugin if WordPress already brings it along!!!

WordPress offers a nice and easy way to load JavaScript libraries, the wp_enqueue_script() function. If you are including a JavaScript file that depends on e.g. jQuery, you can just tell WordPress and it will load jQuery for you!

Example from my jQuery Colorbox plugin:

wp_enqueue_script('colorbox', plugins_url('js/jquery.colorbox-min.js', __FILE__), array('jquery'), '1.3.6');

I tell WordPress to load the Colorbox JavaScript library that depends on jQuery. WordPress makes sure that the jQuery library is loaded before my JavaScript is loaded so everything will work as expected.

wp_enqueue_script description @ WordPress
JavaScript libraries supplied by WordPress