Geolocation Overlay


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. if (google.loader.ClientLocation) {
  2. var loc = google.loader.ClientLocation;
  3. var countryCode = loc.address.country_code;
  4. if(countryCode != "DE" && countryCode != "AT" && countryCode != "CH"){
  5. $s('body').append("<div id='overlay'>Visible for other Countries</div>");
  6. $s("#overlay").modal({
  7. closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
  8. position: ["15%",],
  9. opacity:80,
  10. overlayId: 'overlay',
  11. containerId: 'container',
  12. onClose: container.close
  13. });
  14. }
  15. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.