1

I have a module that uses a bit of jQuery.

But when I submit a form I want it to call an other bit of jQuery on the landing page.

So I thought adding another Drupal.behaviors to my module. But this doesn't seam to work.

(function ($) { 
  Drupal.behaviors.popover_hide = {
    attach: function (context, settings) {
     // open link in new window.
     var linky = $('clickedme').attr("href");
     alert(linky);
     alert('linky');
     // remove class from link

     // set focus on new window eventueel
    }
  };
})(jQuery);

when I already have a Drupal.behaviors.popover loaded. ("popover" is the name of the module)

1
  • Is this question still good enough to help other people? please close it you think it is not. ( see my answer ) – FLY May 11 '12 at 14:45
0

Turns out this does work I just needed to clear cache...

If you have this issue: go to admin/config/development/performance and press the clear cache button.

.js files are cached even though if you have set caching to disabled on the page I just mentioned.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.