URL Parameters to dynamically switch widgets/anchor link
2015-03-05, 09:25 AM,
#1
PHP noob here. Is there any way I can set my webpage to say detect if a user is using a device with less than 1024 screen width and have a URL parameter dynamically appear to change the <a> tag value to a mobile locker link? OR detect adblock and have it switch the code to use a different widget?


Really do not want to have to use JavaScript to redirect to different URLs/subdomians.
Reply
2015-03-05, 04:12 PM,
#2
Try this

Code:
if (window.innerWidth < 1024) {
    // do your stuff
}
Reply
2015-06-22, 04:02 AM,
(This post was last modified: 2015-06-22, 04:02 AM by devmd.)
#3
Why not implement a responsive web design approach using media queries Media (min-width: 1024px) { css styles here...}
For AdBlock check this GIT repo https://github.com/sitexw/FuckAdBlock
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Premium URL Shortener - v4.2 - HOTFIX - CodeCanyon M!st3r XX 28 5,490 2017-08-19, 08:27 AM
Last Post: dikaFp
  [Help]CPAGrip custom URL Locker fieldy2012 5 1,557 2017-04-04, 12:54 PM
Last Post: budiman
  Help needed - Download link freakkz 3 526 2017-01-29, 10:23 PM
Last Post: CharlieHarper
  Cpagrip Url Locker Html Code ashu55 5 2,156 2016-10-30, 07:42 PM
Last Post: baxxx
  [HELP] How to Change Cpagrip Url / File locker Favicon ? ashu55 2 1,267 2016-08-24, 06:35 PM
Last Post: ashu55




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top