I've been working on implementing a toggle div with a tooltip. The issue I'm facing is that the tooltip initially displays "Click to open", but after opening the toggle, it should change to "Click to close". Can someone assist me in achieving this functionality?
If you'd like to take a look at my project, you can download the zip file here.
You can also view the project live by clicking on this Live Link.
$(document).ready(function(){
$(".latestnews").click(function(){
$(".latestnews_toggle").toggle(1000);
});
});
I would greatly appreciate any help in fixing the tooltip to display the appropriate message for opening and closing. It should show "Click to open" when closed and "Click to close" when opened.