-7

I want to change this text to be different on desktop and mobile "Tap an image below to select your image". If it is mobile or tablet I want it to be TAP. If it is a desktop I want it to be CLICK

Caleb Kleveter
  • 10,260
  • 8
  • 56
  • 79
zoolle
  • 1
  • 4
  • what do you mean by 'change'? do you mean the style or size or color, to do this though you would use css media queries [MDN](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries) – Last1Here Dec 10 '14 at 08:49
  • I think [the question you are actually asking](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) is "How can I identify a request coming from a mobile device". – Lix Dec 10 '14 at 08:50
  • 1
    possible duplicate of [What is the best way to detect a handheld device in jQuery?](http://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-handheld-device-in-jquery) – Lix Dec 10 '14 at 08:50
  • Is clearly written if is mobile or table to be TAP if is desktop to be CLICK to be more clear for those who are still sleepy if is on mobile/tablet "Tap an image below " if is desktop to be "Click an image below " – zoolle Dec 10 '14 at 08:51
  • See this question: http://stackoverflow.com/questions/26279082/is-there-a-proper-way-to-make-responsive-text – Salman A Dec 10 '14 at 08:53
  • Could you show us what you've tried thus far? Please go through the tour, so that you know how to ask 'proper' questions: http://stackoverflow.com/tour – Gerwin Dec 10 '14 at 08:54

2 Answers2

2

If you want your output to be diferent, you have to check if the user is using a mobile device server-side (using php,or similar)

PHP:

PHP check UserAgent

If you don't use a server-side languaje like php, you would have to do it using javascript

JavaScript check UserAgent

Community
  • 1
  • 1
DevPGSV
  • 191
  • 7
0

detect the device using javascript/php.

then for all instructions add a common class name. (eg: tap to...)

so if device== mobile/tablet then $(".someclassname").html("tap") or $(".someclassname").html("click")

Madhu
  • 124
  • 3
  • 9