Make menu dropdowns work on touch devices with JAVA using double tap method

So I want to make my menu dropdowns work on touch devices too with double touch. The first touch is opening submenu (if submenu exists) and the second touch on the same menu item goes to URL. I found some javascript code that does that.

The only problem is that it only works when I am on top of the current page. If I scroll a bit and press a menu item, it doesn't open the submenu anymore and it goes directly to the link.

So it just works on top of the page. Any idea why that happening would be appreciated...


//added for surface

window.USER_IS_TOUCHING = false;

[login to view URL]('touchstart', function onFirstTouch() {

window.USER_IS_TOUCHING = true;

// we only need to know once that a human touched the screen, so we can stop listening now

[login to view URL]('touchstart', onFirstTouch, false);

}, false);

function is_touch_device() {

return 'ontouchstart' in window // works on most browsers

|| [login to view URL]; // works on IE10/11 and Surface


$('ul > li > a').click(function(e){

var target = $([login to view URL]);

var parent = [login to view URL](); // the li

if(is_touch_device() || window.USER_IS_TOUCHING){

if([login to view URL]("active")){

//run default action of the link



[login to view URL]();

//remove class active from all links

$('ul > li > [login to view URL]').removeClass('active');

//set class active to current link

[login to view URL]("active");

[login to view URL]("active");




$('ul > li').click(function(e){

//remove class active from all links if li was clicked

if ([login to view URL] == this){





Habilidades: Javascript, Java, jQuery / Prototype

Veja mais: menu dont work yootheme chrome, kind work front end java developer ejbaspvbnet, jtree codes java using netbeans, rtsp video mobile devices java, ipod touch connect internet using usb, image cropping java using selection area, joomla extended menu dont work, joomla drop menu dont work, website development java using ezpublish, login form java using database, quiz demo code java using applet, leave management project java using jsp, touch jewelry pictures using photoshop, student record maintance java using servelets jsp, work flow component created using java tibco, how to make exe file in java using netbeans, how to create a menu in java using switch, how to make exe file in java using eclipse

Acerca do Empregador:
( 1 comentário ) Argos, Greece

ID do Projeto: #20354605

Concedido a:



€30 EUR em 1 dia
(88 Comentários)

8 freelancers estão ofertando em média €21 para esse trabalho


⭐⭐⭐⭐⭐ Hi I read your job description carefully. You can check my past reviews here.❤️❤️❤️ I have developed a lot of websites. I will do my best for your project until you are satisfied. If you hire me, I will finish y Mais

€30 EUR em 1 dia
(23 Comentários)

Hi, I have go through the description and see the jquery code you have attached. I see that you want the menu to work after scroll as well, as you mentioned it doesn't work on scroll page down. To get further, I want Mais

€21 EUR em 1 dia
(16 Comentários)

Hello sir, How is it going? I have read your description carefully. As you can see from my profile, I have 10+ years experience in Full Stack development. With my expertise, i can provide you good result. I am ready t Mais

€19 EUR em 1 dia
(10 Comentários)

Hello there, After gone through your work requirement, I believe that I can provide quality work to you. My name is Mansi, having over five years of experience in the Android & IOS App designing, Web Designing & UI/UX. Mais

€19 EUR in 7 dias
(4 Comentários)

Hello, I am absolutely sure that I can do the project very well. I am a Java expert with 6+ years, especially I have a strong experience with Java I assure you top quality work as i look forward to a long term relatio Mais

€15 EUR in 7 dias
(1 Comentário)

* Dear,manager ! * I am senior developer with over 6 years experiences. I checked your descriptions very [login to view URL] i am sure 100 percent about project,i bid. I am clear about your [login to view URL] i have few questio Mais

€19 EUR in 7 dias
(0 Comentários)

Hi, I can do this. My expertise is in ASP.NET MVC and RestFUL. I have got rich experience with web applications, responsive design. Please have a chat with me, as more details are required. I am a software developer Mais

€14 EUR in 3 dias
(0 Comentários)