We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to set Common theme for a sample so that the UI looks the same in all the platforms?

Platform: jQuery |
Control: General
Tags: general, mobile

By default, Mobile JS control’s UI changes with respect to the platform, such as IOS7, Android, and Windows and gets rendered. To render the controls irrespective of its platform, you can set the specific UI theme as an attribute in the head tag as mentioned in the following code example. In the following example, iOS theme gets rendered in all devices.


<!DOCTYPE html>
<head data-ej-ios7="true">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<meta charset="UTF-8">
<link href="themes/ej.mobile.all.min.css" rel="stylesheet" type="text/css" />
<title>Sample Page title>
<script src="scripts/jquery-2.0.0.min.js" type="text/javascript">script>
<script src="scripts/jquery.validate.min.js" type="text/javascript">script>
<script src="scripts/jsrender.min.js" type="text/javascript">script>
<script src="scripts/ej.mobile.all.min.js" type="text/javascript">script>

The attributes for different render mode are listed here. A Theme, or render mode, called “Flat” provides generic appearance in all platforms instead of its native appearance.

1. IOS7 – data-ej-ios7 =”true”

2. Android – data-ej-android = “true”

3. Windows – data-ej-windows = “true”

4. Flat – data-ej-flat = “true” (Generic theme)

You can make the application to be rendered with a common theme in all devices using this method.


You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile