Hi all,
Used Asp.net Menu Control have designed a navigation bar .Using touchscreen Desktop in Internet Explorer(IE11), single tap not appear but double tap submenus appears but in Microsoft Edge/Google Chrome browser not appear submenus by single tap/double tap .
Touch is working in Edge/Chrome by single tap in other operations like texting etc. It's related to browser issue or code issue. I couldn't find it. Any settings need to change in the Asp.net Menu control.
I tried using jQuery /JavaScript to appear submenus but no result.Any help is appreciated .

$(document).ready(function () {
$(".menu1").click(function (e) {
$(this).toggleClass("show");
});

     });

I tried mouseclick event uisng javascript for asp.net menu items to make it work. submenus appear when its clickable and Tap now in Edge/Chrome.Below code is working one level of submenus is working .How i need to change the code based on this criteria(two levels) - Main Menu->submenus-> submenus .For Example Root->Subroot ->item1,item2 .Any help

> function addClickBehavior(menuTable) {
>            var tbody = menuTable.getElementsByTagName("TBODY")[0];
>            var tr = tbody.getElementsByTagName("TR")[0];
> 
>            for (var i = 0; i < tr.childNodes.length; i++) {
>                var td = tr.childNodes[i];
>                if (td.tagName && td.tagName.toLowerCase() == 'td') {
>                    var anchor = td.getElementsByTagName("A")[0];
>                    if (anchor) {
> 
>                        var onClick = td.onmouseover;
>                        td.onclick =
>                            (function (el, method) {
>                                return function (evt) {
>                                    method.call(el);
>                                    if (window.event) {
>                                        evt = window.event
>                                    }
>                                    evt.cancelBubble = true;
>                                };
>                            })(td, onClick);
>                        td.onmouseover =
>                            (function (el) {
>                                return function () {
>                                    Menu_HoverRoot(el);
>                                };
>                            })(td);
>                        //add cursor style
>                        anchor.style.cursor = "default";
>                        anchor.onclick = function () { return false; };
>                        //td.onmouseout = null;
>                    }
>                }
>            }
> 


   }

I do not have a dev setup for me to look deeply into this but if you research this, look at the other events such as:

$("#grid").on("doubletap", "tr[role='row']", goToDetailsPage);
$("#grid").on("dblclick", "tr[role='row']", goToDetailsPage);

Note: this code is only to show there are other events to watch for.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.