I am using the following HTML:
<form action="/User/Account/LogOff" id="logoutForm" method="post">
<button class="float-left submit-button" title="Logoff">Logoff</button>
</form>
I would like to replace this with:
<form action="/User/Account/LogOff" id="logoutForm" method="post">
<div class="button" id="logout" title="Logout">
<span>Logout</span>
</div>
</form>
Is there a way that I can catch a click on the div#logout and use this as a submit for the form? I saw this for a link:
<a href="javascript:document.getElementById('logoutForm').submit()">Logout</a>
But how could I do it for a DIV like mine?