tags:

views:

18

answers:

2

I am working on Jquery-UI my question

how to set default jquery ui theme ?

please provide code.

A: 

You can change the CSS dynamically, so just write your default jQuery theme on link tag. later you can call following function to change the theme:

<link type="text/css" href="css/excite-bike/jquery-ui-1.8.4.custom.css" rel="stylesheet" id="cssId" />  

<script type="text/javascript">
function change(){
document.getElementById('cssId').href="css/start/jquery-ui-1.8.4.custom.css";
}
</script>
Vikas
i want to change default them i.e select default theme on document load not by themroller
Pranay Rana
+1  A: 

Visit the jQuery UI ThemeRoller. From there, you can set the look and feel of your custom jQuery UI. Alternatively, you can download an existing theme.

Once you've made your choice, click "Download theme." You'll be taken to another page where you can select/deselect which components to support. Click "Download", and a zip file should be forced to your browser.

Once the download is complete, browse to the unpacked folder. You'll see an example index.html. In order to use the custom theme on your site, just copy this portion of the head:

<!DOCTYPE html>
<html>
<head>
<!-- jQuery UI CSS -->
<link type="text/css" href="/css/custom-theme/jquery-ui-1.8.5.custom.css" rel="stylesheet" />   
<script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
<!-- jQuery UI Library -->
<script type="text/javascript" src="/js/jquery-ui-1.8.5.custom.min.js"></script>
</head>
<body>
...
</body>
</html> 

The last step is to copy the downloaded 'js' and 'css' folders to your public web root. Good luck!

simeonwillbanks