Question

I want to open one of the submenus of a superfish menu with an event. For example with a button and "onclick". And i want it to stay opened until you press a Close button How could i do that? Can i call a "hover event" function from the superfish.js somehow?

<ul class="sf-menu">
        <li class="current" id="qwqw">
            <a href="ceg.html" id="fmp1">ThisToHover(forexample)</a>
            <ul >
                <li>
                    <a href="ismerteto.html" id="fmp9">Ismertető</a>
                </li>
                <li class="current">
                    <a href="cegtortenet.html">Cégtörténet</a>
                </li>
                <li>
                    <a href="telephey.html">Telephely</a>
                </li>
                <li>
                    <a href="iso.html">ISO</a>
                </li>
                                    <li>
                    <a href="referencia.html">Referecciák</a>
                </li>
            </ul>
        </li>
        <li>
            <a href="tevekenysegek.html" id="fmp2">menu</a>
                    <ul>
                            <li><a href="teherfuvarozas.html">Teherfuvarozás</a></li>
                            <li><a href="gepszallitas.html">Gépszállítás</a></li>
                            <li><a href="gepber.html">Gépbérlet</a>
                            <ul>
                            <li><a href="gepber.html">Subsubmenu</a></li>
                            <li><a href="gepber.html">Nyan Cat</a></li>
                            </ul>
                            </li>
                            <li><a href="foldmunka.html">Gépi Földmunka</a></li>
                            <li><a href="bontas.html">Bontás</a></li>
                            <li><a href="tores.html">Lorem Ipsum</a></li>
                    </ul>


        </li>
        <li>
            <a href="contact.html" id="fmp3">menu</a>
        </li>

        <li>
            <a href="images.html" style="border-right: 1px solid #FFF" id="fmp4">menu</a>
        </li>   
</ul>
Was it helpful?

Solution

it was so much easier than I thought. Simply had to add class 'sfHover'

document.getElementById('qwqw').className='sfHover';

...for example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top