Monday, February 20, 2012

wire a click event to a child element within a jasmine-jquery widget

setup: function (defaultStateIsOpen) {

   self.options.stateIsOpen = defaultStateIsOpen;

   self.options.container = self.element;

   self.definePortletHeader(self.options.container.children(":nth-child(1)"));

   self.definePortletContent(self.options.container.children(":nth-child(2)"));

   self.alterAppearanceBasedOnOpenState();

   self.options.portletHeader.click(function () {

      self.toggle();

   });

   self.reveal();

},

No comments:

Post a Comment