In the responsive design era, you may want to do some extra operations if the user is on mobile, like something I mentioned in my last post where my colleague wanted to remove some specific classes if the user is on mobile.
To do that, you can check the navigator.userAgent value. And with the help of regex you can do,
var isMobile = /android.+mobile|ip(hone|[oa]d)/i.test(navigator.userAgent);
As you can see, we are matching against few of the major mobile user agents. But keep in mind that there are too many devices variants so user agents too, so if you need a more accurate result may be this answer on SO will be helpfull.
About the author
In one simple line of code, we can check whether the given string is Arabic or not, in C#.
This a short article about how can we remove a specific class from all elements that do have the class easily using jQuery.
This is a short article on how to link within the document in a markdown (.md) file.