Trouble creating multiple functions in jquery

I am having an issue creating jquery to toggle between hide and show on a division or class when adding more than one function. For example I want to give users the option of displaying more or less features on a page.

Here is the sample code:
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#flip").click(function(){
$("#panel").slideToggle("slow");
});
});
</script>

<style>
#panel, #flip {
padding: 5px;
text-align: center;
background-color: #e5eecc;
border: solid 1px #c3c3c3;
}

#panel {
padding: 50px;
display: none;
}
</style>
</head>
<body>

<div id="flip">Click to slide the panel down or up</div>
<div id="panel">Hello world!</div>

</body>
</html>

  • Adam Czajczyk

    Hello I CAN Apply,

    I hope you're well today and thank you for your question!

    The code that you shared works perfectly fine so far. I'm not quite sure though what is the end goal here so since you are experiencing issues, could you please share some code that is actually failing for you? I'll be happy to take a look at it.

    Please note though: this question doesn't seem to be WP related at all (at least not in that form) so while I'll do my best to help, I may not be able to fully assist you as WP questions are priority here. I believe you understand that :slight_smile:

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.