Top Left Text cha

Web & App Development

Just a little Javascript will do the trick...
        window.onbeforeunload = function(e){
            document.getElementById('idOfElementToChange').className = 'classAddedAfterClick';

 Pretty self-explanatory.  Replace idOfElementToChange with the ID of the element that will incur the new class.  And ClassAddedAfterClick is the new class that will be added.  Probably didn't need to say this.

Add comment

Security code

  • No comments found

Leave your comments

Post comment as a guest

Your comments are subjected to administrator's moderation.