So I have an UL tag with several LI's every LI has his own UL. On desktop device, the second UL displays Block by hovering the first level LI. But on the Mobile device I want to make it on click.
In the header, I have a Contact Us button, that triggers a click event on that LI so the Contact Us text appears, this works fine only if this happens on the page with the contact field, but if I'm on a another page I don't know how to target that page and make a click action on it.
I think its something like, detecting the link in the URL, if after has a hash tag take that tag find it in page, if you find it make a Click event on it.
But I don't really know how to write the code for it.
The HTML structure looks something like this :
<div id="ClickForContact">Contact Us</div>
<ul>
<li>
<a>Something else</a>
</li>
<li>
<a id="contact">Contact</a>
<ul class="subMenu" >
<li>
<p>Some text here and there.</p>
</li>
</ul>
</li>
</ul>
So any help here?