CurvyCorners/drupal_add_js Messing Up Menus

trijump3540 - September 4, 2008 - 03:19

Hey All,

Okay so I'm trying to get curvy corners to work on a theme. Specifically I'm using the ad_blueprint theme and trying to modify that. So I've read a lot of articles on how to go about adding Javascript to a site, and everything I read points to drupal_add_js as the way to go. Also from what I've read, its supposed to go in the template.php file. So I just stuck in the following at the end of my template.php file...

drupal_add_js('/sites/all/modules/jquery_plugin/jquery.curvycorners.min.js', 'module');
drupal_add_js(
    '$(document).ready(function() {
      $("#wrapper").corner("round 30px");
    });',
    'inline'
  );

Now this will produce the proper effect it seems. All the corners get rounded on the wrapper div. But this seems to disable any collapsable menus. Most noticeably it messes up the DHTML Menu module - the menus wont expand or collapse. But it also messes up other expand and collapses like when creating new content - you can't expand any of the options on that page.

So it seems I've nullified any and all javascript except the curvy corners. I've also tried hard coding the script right into page.tpl.php and I still get the same problem. My corners curve but everything else breaks. Any ideas as to where I'm going wrong? Am I adding the javascript at the wrong time, should it be enclosed in a function or something? As of now - I'm completely lost and any and all help would be greatly appreciated. Thanks!

Okay so now i've removed

trijump3540 - September 4, 2008 - 19:37

Okay so now i've removed everything from the template.php file and tried to installed JQuery Eye Candy along the the jquery_plugin module. I enabled both of these, go into the EyeCandy settings and expand the CurvryCorners plugin - I hit the checkbox to enable it and then i put the following code into it...

$(function(){
$('#page').corner();
});

The exact same thing happens to me - none of my menus will expand or collapse. Does anyone have an idea as to what is happening?

An Upgrade Of jquery.curvycorers Fixed This For Me

KarlKedrovsky - November 3, 2008 - 02:09

I know this thread is kinda old but I just ran into the same problem with jquery.curveycorners (not with a module though). I upgraded from version 1.7 to 1.8 and the problem went away.

Thank You!

trijump3540 - December 1, 2008 - 19:56

I'm just now seeing that someone replied to one of my threads. I took your suggestion of updating to 1.8 and now it appears to be working like it should. That is a massive headache that I don't have to deal with now. Thank you very much for the tip!

 
 

Drupal is a registered trademark of Dries Buytaert.