Drupal and jQuery
wpanssi - May 14, 2008 - 21:01
I'm new with jQuery. I would like to use this jQuery plugin: http://plugins.jquery.com/project/TableDnD in my Drupal site. What modules do I need? jQuery update maybe?
How do I install a jQuery plugin into my Drupal site?
Thanks in advance!

Well...
I think everything you need to know is right here:
http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/
--
Juan Timaná
www.ezwp.com
Yes, I read the
Yes, I read the instructions. But what about Drupal? Some earlier version of jquery ships with Drupal 5. And the plugin requires newer version. I installed jquery update module and then I added a tag to include jquery.tablednd.js and tried to make it work but didn't succeed.
So, do I need to download the latest jquery and can I then just replace the Drupal's jquery in misc/jquery.js??
I tested with the latest
I tested with the latest version of jquery and it worked!
But can I break some built-in javascript functionality in Drupal because the core uses earlier jquery version?
And could I use the latest (and much bigger) jquery version only on certain pages where I intend to use it..?
Here is what I do in the
Here is what I do in the page body, where I'm testing jquery:
<?php
drupal_add_js('sites/all/jquery-stuff/jquery-1.2.5.js', 'header');
drupal_add_js('sites/all/jquery-stuff/jquery.tablednd.js', 'header');
drupal_add_js(
'$(document).ready(function() {
$("p").fadeIn("slow");
});',
'inline'
);
?>
When I add the first two drupal_add_js -functions the fadein -effect stops to work. I assume taht it's because drupal core uses earlier jquery. How do I fix this? I have installed jquery update, but it doesn't seem to work..