Skip to content
Advertisement

Tag: safari

How to check if IOS/Safari version below 15 or 15 and higher

I need to detect user IOS/Safari version and if its below 15 do not render some content for him, cause it doesn’t support under 15 versions I’ve tried to use So i see in the console the Safari version, but not quiet understand how to check if it 15 or below Answer I think i find solution For me works

Javascript media queries not working in safari / iOS

Hope someone can help. The following lines of code work in everything except Safari. Has anyone else discovered how to get Safari to recognise / process these queries? Any and all help gratefully received. Answer Safari does not support resolution, though it looks like the relevant bug has been fixed so it’ll come out at some point in a Safari

Only in Safari: ReferenceError Can’t find variable

Many of my scripts look like this: They work fine on Chrome, Firefox, Edge and Opera but on Safari I get the error: Workaround If I declare the constants before the if statement the code works… …but I don’t understand why and I don’t what to make the constant globally available. Maybe someone can explain to me that Safari-only-behavior. Answer

Insert tag in loop javascript

I want to insert the p tag after each rect tag but unfortunately when I used appendChild the p tag is insert into the rect tag and not after: JS code: I had as a result: ** html Code:** Answer You can use Element.insertAdjacentElement instead of appendChild (which inserts it as a child inside).

Advertisement