You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run Effect.show(e, element) on an element via an API call, and Waves.ripple(element) could mimic a click event occurring at the centre of the element, where element is a string passed to a querySelector.
Simulate mousedown and an immediate mouseup in the centre of element. I'll add this tonight, and this will simplify the mouseover/mouseleave/hover effect (requested in issue #105) as you can simply call Waves.ripple() on mouseover.
Question: Would Waves.ripple(element) check element for .waves-effect classes, or should it assume (for performance) that the necessary classes have already been set; since the user can [and should] set these through the HTML template and/or Waves.attach()?
In future, options to the function (If we used Waves.ripple(element, options)) could include setting the position of the ripple, timing etc.
The text was updated successfully, but these errors were encountered:
hoxxep
changed the title
API/Effect Waves.ripple(element)
API: Waves.ripple(element)
Apr 14, 2015
Solved in pull request #113. It does not check for .waves-effect. It includes a warning in the documentation that .waves-effect should already be present on the element and could be added via Waves.attach().
Waves.calm(elements) was also added in that pull request to remove all ripples from an element. Useful when a ripple has no timeout.
Run
Effect.show(e, element)
on an element via an API call, andWaves.ripple(element)
could mimic a click event occurring at the centre of the element, whereelement
is a string passed to a querySelector.Simulate
mousedown
and an immediatemouseup
in the centre ofelement
. I'll add this tonight, and this will simplify themouseover
/mouseleave
/hover effect (requested in issue #105) as you can simply callWaves.ripple()
onmouseover
.Question: Would
Waves.ripple(element)
checkelement
for.waves-effect
classes, or should it assume (for performance) that the necessary classes have already been set; since the user can [and should] set these through the HTML template and/orWaves.attach()
?In future, options to the function (If we used
Waves.ripple(element, options)
) could include setting the position of the ripple, timing etc.The text was updated successfully, but these errors were encountered: