Incorporating: Visual Studio 2013, ASP.NET (VB) Webforms.
Upgrading an existing WebForms website from .NET 2.0 to .NET 4.5 and implementing mobile-friendly features for better Google support.
I have added a button to the top right corner as follows:
<a href="#" onclick="toggleMenuDiv();">
<img class="headerimg-r" src="/images/MenuBtn6464.png" />
</a>
The associated JavaScript function is shown below:
function toggleMenuDiv() {
var menu = document.getElementById('menu');
if (menu.style.display == 'none') {
menu.style.display = 'block';
}
else {
menu.style.display = 'none';
}
}
The HTML element with id "menu" is defined as follows:
<div class="dropdownmenu" id="menu">
However, it seems that I need to tap on the button twice to drop down the menu instead of just once. All the menu links are functioning properly with single taps.
Feel free to test it out yourself. Visit from a mobile device and give it a try.
I feel like I might be overlooking something simple; could someone please guide me in the right direction?
Thank you!