[support] Drupal behaviors misbehaving

Jeff Greenberg listmail.ayendesigns at gmail.com
Fri Mar 15 14:48:55 UTC 2013


I have the following in Drupal.behaviors:

$(context).find('#x').prepend('<div class="settings"></div>');
      $(context).find('div.settings').click(
        function () {
          $('#p').show();
        },
        function () {
          $('#p').hide();
        }
      );
The div gets prepended, but the click does nothing. If I just enter the
jQuery('#p').show() in the console, it works fine.

-- 
---
drupal.org/user/367108
linkedin.com/in/jeffrgreenberg
accidentalcoder.com / ayendesigns.com
@accidentalcoder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130315/8b2cffef/attachment.html 


More information about the support mailing list