I create my site using MaterializeCSS ( http://materializecss.com/ )
I am wondering how I can trigger the Wave / Ripple effect manually for a specific control, for example:
"Start the wave / ripple effect of a specific button."
The MaterializeCSS team claims that they use the Waves.js port of the javascript library ( http://fian.my.id/Waves/ ), but errors appear when I try to use the commands in the browser console.
Can someone point me here?
Code used as an example:
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link type="text/css" rel="stylesheet" href="css/materialize.css" media="screen,projection"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<script type="text/javascript" src="jquery/jquery.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
<title>My website title</title>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
Waves.ripple('#but_1');
});
</script>
<a id="but_1" class="waves-effect waves-light btn">button</a>
</body>
</html>
According to MaterializeCSS ... command
" - , Materialize to , " "
... Waves docs....
Waves.ripple(, ) HTML- programmaticaly.
(http://fian.my.id/Waves/#api)
, :
Uncaught TypeError: Waves.ripple
user695800