I am trying to a small script that will change the dimensions of an iframe when the iframe clicked. Here is the code for the iframe:
$("#myKAframe").click(function () {
$('#myKAframe').css({ "height": "100%", "width": "100%" });
});
<script
src="https://code.jquery.com/jquery-3.5.1.js"
integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
crossorigin="anonymous"></script>
<iframe id="myKAframe" src="ka.html" title="KA"
style=" padding: 0px; margin: 10px 20px; position: fixed; bottom: 0px; overflow: visible; opacity: 1; border: 0px; z-index: 999998; transition-duration: 250ms; transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1); transition-property: opacity, top, bottom; right: 0px;">
</iframe>
My issue is that, first of all, the code isn't working. And second, I don't know how to make the jquery such that when the iframe is clicked again, it goes back to the small dimensions. I'm pretty new to jQuery so any help I could get would be greatly appreciated.