jquery dev. kinda sucks in drupal

lefnire - January 25, 2008 - 23:36

i gotta say, programming jquery is biotch in drupal. it's fine when you're working with regular ol' jquery.js functions, but there's a whole library of UI pluggins out there that aren't included. any time I try to install one of these pluggins, it usually breaks the built-in javascript of drupal (like collapsible fieldsets).

it seems that the issue is that drupal has the built-in jquery.js, which if overrided by the oft-required most-recent version (by means of in page.tpl.php), then the whole javascript functionality of a drupal installation falls apart. furthermore, i always get similar conflict when doing prototype, scriptaculous, or dojo in drupal. it's like drupal was only meant to work with the javascript it comes packaged with, which is quite limiting.

am I an idiot? is anyone else having these issues?

my javascript statement got

lefnire - January 25, 2008 - 23:37

my javascript statement got cut out, it was supposed to be:
"(by means of <script src="http://code.jquery.com/jquery-latest.js"></script> in page.tpl.php)"

Custom web design & development

I can't speak about extra

dvessel - January 26, 2008 - 18:36

I can't speak about extra plug-in's. I assumed it would work as long as it's compatible with the core version of jQuery that's included with Drupal.

But you can't add in the latest jQuery and expect it to work. There may be some shortcomings with this but it's greatly out weighted by what it does provide.. Stability to the core scripts that were written for a specific version of jQuery and it also includes contributed modules. As jQuery is updated, new bugs can be introduced so it must be tested heavily. Non-point releases are out of the question due to API changes. They are only updated on major updates in Drupal.

As rickvug mentions, try the update plug-in.

meh, i guess I'm just

lefnire - January 27, 2008 - 00:52

meh, i guess I'm just whiner. I actually had previously installed the jquery update, which fixed my problem for certain jquery issues, but most of the UI pluggins I've been wanting to use lately require 1.2.3, where the update module only covers 1.2.1 (pretty big feature jumps for minor versions, evidently lol)

i guess i'll just kick it without my shnazzy accordions and wait for D6 (looks like they got a 1.2.3 patch on the way). anyway, thanks for the newbie-patience fellas!

Custom web design & development

Try jQuery update

rickvug - January 25, 2008 - 23:47

Unfortunately, Drupal 5 shipped around the same time that a new version of jQuery was released. Drupal 6 will include jQuery 1.2. If you require a newer version of the library try http://drupal.org/project/jquery_update for a solid fix. It is completely possible to include the jQuery UI library by creating a small helper module to do so. Alternately, the links to the library can be put directly into a customized theme. Check out the javasscript section of the modules repository to see more possibilities of what you can do with jQuery.

I hope this helps send you in the right direction...

-------------------------------------------------------------------
Rick Vugteveen | Image X Media (work) | Blog (personal)

jQ module

ica - January 26, 2008 - 18:07

also check out this module for jquery plugin inclusion on top of jquery_update.module
http://drupal.org/project/jq

anyone having trouble with

lefnire - February 6, 2008 - 06:56

anyone having trouble with animate()? i've got jquery update installed, and no matter what parameters I use for animate() i get this error:
e[prop[p]] is not a function

here's my example code:
$(document).ready(function(){
$(".fp-design").mouseover(function(){
$(this).find("#first-child").animate({width:"0px"},500);
});

});

Custom web design & development

anyone solved this issue?

edford2008 - June 3, 2008 - 12:03

I am also having this problem with animate(). here's my code:
$(document).ready(function(){

$("#login-link").click(function(){
$("#loginFade").animate({
top: "200px"

}, 1500 );
});

});

hello, got the same issue

magoo - September 13, 2008 - 18:26

hello,

got the same issue when using animate and the jquery provided by the jquery_update module.

Anyone got it solved?

--
magoo

 
 

Drupal is a registered trademark of Dries Buytaert.