In my application, i have calendar icon so when it is clicked the calendar pop up shows.
So, I have the following jQuery code which hides the section when i clicked anywhere of <Div>
matching with css
class.
<script>
$(document).ready(function(){
$(".myContent").click(function () {
$(".calendar").hide();
});
});
</script>
However, the issue i am facing is it works fine for the first time
i.e. Click on Calendar Icon shows calendar popup.. than click on anywhere inside Div hides calendar pop-up.
However, When i reclick on Calendar icon than it does not show calendar popup unless i refresh the whole page.
I am guessing that i need to unbind click event but not sure how... Any help please?