Uploaded image for project: 'PUBLIC - Liferay Alloy UI'
  1. PUBLIC - Liferay Alloy UI
  2. AUI-116

Add the .hover method to Nodes

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.1
    • Component/s: Node
    • Labels:
      None

      Description

      Adding the .hover method to Node.
      I'm adding this in so close to GA because after reviewing the old plugins themes/portlets, hover is one of the most request features, and hoverIntent is one of the most commonly used of the old jQuery plugins.
      This method handles both cases easily. This method could also one day replace our StateInteraction plugin.

      //Simplest use case
      A.one('#myNode').hover(
      function(event)

      { this.addClass('hover');},
      function(event) {this.removeClass('hover');}
      );

      // To handle complex delays
      A.one('#myNode').hover(
      {
      over: function(event){ this.addClass('hover');}

      ,
      out: function(event)

      {this.removeClass('hover');},
      overDelay: 0,
      outDelay: 500
      }
      );

      // Handling multiple event types and complex event scenarios
      A.one('#myNode').hover(
      {
      over: function(event){ this.addClass('hover');
      if(event.type == 'blur'){
      this._hoverOptions.outDelay = 3000;
      }
      },
      out: function(event) {this.removeClass('hover');}

      ,
      overDelay: 0,
      outDelay: 500,
      overEventType: ['mouseenter', 'focus'],
      outEventType: ['mouseleave', 'blur']
      }
      );

        Attachments

          Activity

            People

            Assignee:
            nathan.cavanaugh Nate Cavanaugh
            Reporter:
            nathan.cavanaugh Nate Cavanaugh
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              11 years, 13 weeks, 1 day ago

                Packages

                Version Package
                1.0.1