mardi 9 août 2016

Javascript Hide an If statement with another If Statement

I want to hide an If statement if the user is on a mobile device. I tried with another if statement:

if(version.major === 0) {
                document.write('Du benutzt aktuell keinen Flash Player! ');
                flashPlayerVersion.style.display = 'none';
            }

and with this If statement I tried to hide the other one if the user is a mobile user.

 var mobile = (/iphone|playbook|windows phone|mobile|silk browser|android.webkit.WebView|web app runtime|kindle|kindle fire|blackberry|ipod|ipad|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
    if (mobile) {
        FlashNotification.style.display = 'none';

    }

Now i want to hide the flashPlayerVersion ...

Hope you could understand my question ^^




Aucun commentaire:

Enregistrer un commentaire