Simple way toggle script using jQuery?

Hey!

Someoen can help me with share a snippet easy way with toggle using jQuery?

I mean on click show the hidden text and on again click hide that.

Thanks

small example…

<html>
  <body>
<div class= "target">Hide me</div>
<div id="clickme">
  Click <strong>HERE</strong>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$( "#clickme" ).click(function()
{
       $( ".target" ).toggle( "slow", function()
         {   
         });
});
</script>
</body>
</html>
1 Like