Find Jobs
Hire Freelancers

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

€8-30 EUR

Completed
Posted almost 5 years ago

€8-30 EUR

Paid on delivery
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... $(document).ready(function(){ //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 } else{ [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){ $(".active").removeClass('active'); } }); });
Project ID: 20354605

About the project

6 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
autoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoautoauto
€30 EUR in 1 day
5.0 (104 reviews)
5.7
5.7
6 freelancers are bidding on average €22 EUR for this job
User Avatar
⭐⭐⭐⭐⭐ 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 your job ASAP with the highest quality. Looking forward to the good news! Thank you.
€30 EUR in 1 day
5.0 (25 reviews)
6.1
6.1
User Avatar
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. My expertise - UI/UX Mobile App Screen designs (Android | IOS) Website Mockups & HTML Graphic Design Photoshop PSD creation PSD to html HTML5 Bootstrap Logo & Banners designing CSS Jquery and Javascript Wordpress E-commerce Kindly reply to discuss more over chat. Best regards, - Mansi
€19 EUR in 7 days
4.9 (4 reviews)
2.7
2.7
User Avatar
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 relationship with each of my clients. please give me a chance and i well make sure that you'll more than happy with the final output best regards
€15 EUR in 7 days
5.0 (1 review)
0.8
0.8

About the client

Flag of GREECE
Argos, Greece
5.0
3
Payment method verified
Member since Jul 4, 2019

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.