Comment on Why OCaml, Why Now?parentComments−jarrett12yYou do it all the time in web apps. For example, changing the text of a toggle link between "show" and "hide." For example, with jQuery: $('#toggleLink').click(function() { if ($('#toggleLink').html() == 'Show') { showRollout(); $('#toggleLink').html('Hide'); } else { hideRollout(); $('#toggleLink').html('Show'); ] });−copergi12yI think you misread something. He asked how to do it without manipulating the DOM.
Comments
You do it all the time in web apps. For example, changing the text of a toggle link between "show" and "hide." For example, with jQuery:
I think you misread something. He asked how to do it without manipulating the DOM.