I searched this forum for “tooltips” and was surprised to find no previous queries on this topic. Amazing! Well, here’s the situation…
I have links with tooltips in my LG content. (For MD and smaller, I have reworked my content and eliminated the tooltips.) I want the tooltips displayed (obviously) but only on desktop computers. I do NOT want the tooltips displayed on any mobile/touch device. But the problem is that the 12.9" iPad displays Blocs “LG” content, and hence it displays the tooltips, forcing the user to tap 2 times for every single link on which there is a tooltip. This is frustrating beyond words.
I found the following discussion on this matter:
The only code shown in that discussion that makes any sense is the following, since it sniffs out whether the device is Touch or not (rather than blindly just make a choice based on display size).
function isTouchDevice(){
return true == ("ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch);
}
if(isTouchDevice()===false) {
$("[rel='tooltip']").tooltip();
}
I added that code to the Footer of my Blocs document and then tested in Apple’s Simulator app (in MacOS High Sierra), and within Simulator I selected a 12.9" iPad (since I don’t have a physical iPad that large to test on), and I loaded my Blocs website and clicked on my links in the Simulator only to find no change! Your first click shows the tooltip, and then you must stupidly click a second time to engage the link. So either that code is wrong or that code doesn’t work inside the Simulator app because it somehow knows I am running a Simulator on a desktop computer instead of an actual touch device. I don’t know. But surely someone out there has a 12.9" iPad who can test this sort of thing.
You would think this tooltip issue would be already settled and built into Bootstrap 4, but clearly it is not. Odd.
Surely I am not the only Blocs user who has encountered this, so I look forward to hearing the solutions that some of you have been using to suppress tooltips on touch-based mobile devices (regardless of display size).
Keep in mind that code only works on tablets like the iPad. It doesn’t work on the iPhone though. (You can verify this yourself either on actual devices or just download XCODE and use the Simulator app to simulate various iOS, iPhone and iPad versions – even the Apple TV!) In my application that’s OK because I only have tooltips on my navigation dropdown menu, and the menu for LG differs from my menu for MD and smaller screens. (I did not put tooltips on my menu that displays in MD and smaller.)
I suspect though that most Blocs users will want to bloc tooltips from all mobile touch devices like iPads and iPhones. There doesn’t seem to be an easy solution for that which doesn’t also block tooltips on touch notebooks too.
So again, if your needs are like mine and you only want to block tooltips on tablets like the iPad, then the code @Pealco very kindly created works great.
Regardless of who wrote it or linked to it, the point of my previous post remains. If you need to kill tooltips on all touch devices including iPhones, it won’t work. That code is for iPads.
I don’t know what you trying to do… but I will explain you how life works this days.
Anyone in here can copy/paste code or text or whatever. But they have to take time to do the search. And some times they found in a lot of threads codes, but they can’t implement in Blocs, so you/me can help.
I didn’t know that your car have square tires, I suppose that because other people already used circular tires, so you can’t use them right?
And no I don’t use a lot the copy paste solutions, but you know what? I will no more make any replies in this forum… YOU help the people and take all the time that I’m using here to help in here.
I think I know why you upset, probably some codes I reveal here, allow people to fix their problems, without the use of brics… who knows???
Obviously people like that you search for them and show how to implement those topical searches into Blocs. I have found it interesting reading threads that you choose not to correct people whom were heaping praises upon you across multiple threads and instead preferring to take the credit of others from your searches. Beyond the premise of attributing, many times the found solutions may or may not be optimal, so a lot of times supplying the source link provides more in-depth context, learning and understanding for others on the topic being discussed.
It seems rather silly you’ve gotten upset with saying you will now run off. By all means don’t let me hinder your process, carry on. Sorry if you felt offended.