Support » Plugins » Hacks » Media query question

  • Wondering if there is any way I can use a media query to construct a new window or tab url if the user is accessing via mobile, versus a modal pop-up if the user is accessing via monitor. I’ve tried eight gazillion different modal window plugins and css/js/html to get the content to work on a phone; unfortunately the content for the modal window was provided by a government agency with strict instructions not to reformat, and it just doesn’t work in a mobile modal popup. Also, the url content is updated with numbers via javascript, so that needs to work too. Advice?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz


    Media queries can only effect how HTML is shown on a page. They cannot actually change the HTML or cause the browser to do things like open new windows. You need to use javascript or jQuery to take action based on the device’s browser. If it’s a mobile browser, launch a new window, otherwise launch the modal.

Viewing 1 replies (of 1 total)
  • The topic ‘Media query question’ is closed to new replies.