How can i toggle a class with workflow not click (javascript)?
I tried to toggleclass without click but didnt work:

#demnuicon {
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.rotated { transform:rotate(180deg); -webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -o-transform:rotate(180deg); }
$(document).ready(function() {
$(‘#dmenu’).click(function() {
$(‘#demnuicon’).toggleClass(‘rotated’);
});
});