Turbiville Posted October 5, 2023 Share Posted October 5, 2023 Is there CSS to block MOBILE from holding on an image and saving it? I know this code below works on desktop, but on mobile I can still hold an image and get the pop up "save image" and it shows the image url and file name ( this is on iPhone ). I'd like a way to prevent this on mobile as well. Does anyone know a way to do this? This code works on desktop but not mobile. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function () { $("body").on("contextmenu",function(e){ return false; }); }); </script> Link to comment
Ziggy Posted October 6, 2023 Share Posted October 6, 2023 Try this: Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment