mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-07-27 16:39:57 +03:00
fix for #18 , credits to @waylaidwanderer
This commit is contained in:
parent
7b5e43fc7b
commit
5b249397d5
|
@ -71,7 +71,6 @@ var ripples = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var rippleOut = function($ripple) {
|
var rippleOut = function($ripple) {
|
||||||
console.log($ripple);
|
|
||||||
// Clear previous animation
|
// Clear previous animation
|
||||||
$ripple.className = "ripple ripple-on ripple-out";
|
$ripple.className = "ripple ripple-on ripple-out";
|
||||||
|
|
||||||
|
@ -109,12 +108,14 @@ var ripples = {
|
||||||
// init RippleJS and start ripple effect on mousedown
|
// init RippleJS and start ripple effect on mousedown
|
||||||
bind("mouseover", withRipple, rippleInit);
|
bind("mouseover", withRipple, rippleInit);
|
||||||
|
|
||||||
console.log(withRipple);
|
|
||||||
// start ripple effect on mousedown
|
// start ripple effect on mousedown
|
||||||
bind("mousedown", ".ripple-wrapper", rippleStart);
|
bind("mousedown", ".ripple-wrapper", rippleStart);
|
||||||
// if animation ends and user is not holding mouse then destroy the ripple
|
// if animation ends and user is not holding mouse then destroy the ripple
|
||||||
bind("rippleEnd", ".ripple-wrapper .ripple", function(e, $ripple) {
|
bind("rippleEnd", ".ripple-wrapper .ripple", function(e, $ripple) {
|
||||||
if (!mouseDown) {
|
|
||||||
|
var $ripples = $ripple.parentNode.getElementsByClassName("ripple");
|
||||||
|
|
||||||
|
if (!mouseDown || ( $ripples[0] == $ripple && $ripples.length > 1)) {
|
||||||
rippleOut($ripple);
|
rippleOut($ripple);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -71,7 +71,6 @@ var ripples = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var rippleOut = function($ripple) {
|
var rippleOut = function($ripple) {
|
||||||
console.log($ripple);
|
|
||||||
// Clear previous animation
|
// Clear previous animation
|
||||||
$ripple.className = "ripple ripple-on ripple-out";
|
$ripple.className = "ripple ripple-on ripple-out";
|
||||||
|
|
||||||
|
@ -109,12 +108,14 @@ var ripples = {
|
||||||
// init RippleJS and start ripple effect on mousedown
|
// init RippleJS and start ripple effect on mousedown
|
||||||
bind("mouseover", withRipple, rippleInit);
|
bind("mouseover", withRipple, rippleInit);
|
||||||
|
|
||||||
console.log(withRipple);
|
|
||||||
// start ripple effect on mousedown
|
// start ripple effect on mousedown
|
||||||
bind("mousedown", ".ripple-wrapper", rippleStart);
|
bind("mousedown", ".ripple-wrapper", rippleStart);
|
||||||
// if animation ends and user is not holding mouse then destroy the ripple
|
// if animation ends and user is not holding mouse then destroy the ripple
|
||||||
bind("rippleEnd", ".ripple-wrapper .ripple", function(e, $ripple) {
|
bind("rippleEnd", ".ripple-wrapper .ripple", function(e, $ripple) {
|
||||||
if (!mouseDown) {
|
|
||||||
|
var $ripples = $ripple.parentNode.getElementsByClassName("ripple");
|
||||||
|
|
||||||
|
if (!mouseDown || ( $ripples[0] == $ripple && $ripples.length > 1)) {
|
||||||
rippleOut($ripple);
|
rippleOut($ripple);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user