0

I'm trying to display different content based on user location. I'm using this code here:

<div id="res"></div>  
  <script>
    $.get('https://ipinfo.io', (res) => {
      if(res.country !== 'NL'){
        $('#res').html(`
          <p>Instert Cool HTML stuff here</p>
        `)
      }
    },'jsonp');
  </script>

I was trying to add more country tags after the 'NL' like this:

(res.country !== 'NL''DE')

or like this

(res.country !== 'NL','DE')

or like this

(res.country !== 'NL' ||
 res.country !== 'DE'
)

None of them seems to be working...

voyaller
  • 1
  • 3

0 Answers0