Does not work ,Remove class from a div

i can’t get a class out of a div, despite trying the methods below

this javaScript

this html

indent preformatted text by 4 spaces
        <div class="fantasma"  id="div" onclick="rimuoviMaster()"  ><span id="freccia"   class="f7-icons" style="font-size:20px">decrease_indent</span></div>

i can’t remove the fantasma class

If you are only trying to remove a class from a Div, I’d use Dom7’s .removeClass(className) instead.