Solved

jquery themeroller how do I use for elements that aren't touched by a plugin?

Posted on 2012-04-13
2
293 Views
Last Modified: 2012-05-07
I want to use themeroller for my project.  I can see that you can easily apply an accordion, button, modal, etc plugin to a dom element and it will apply the themeroller classes which is great.

What if I want a div to have a background and border that matches a modal popup?  For instance, I have a custom dropdown that appears under a button.  If I use themeroller for the buttons and everything else, I would want my new div to match everything else.  If I manually add style to my div, then change the theme, my new style would not be updated.  How can I add these themes with other dom objects that I don't apply a plugin to?
0
Comment
Question by:jackjohnson44
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
Proculopsis earned 500 total points
ID: 37843300
A jQuery dialog generates the following html so you can pick any of the style classes and use them in your own content which will change according to the selected theme:

<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    
<DIV style="Z-INDEX: 1001; POSITION: absolute; OUTLINE-STYLE: none; OUTLINE-COLOR: invert; OUTLINE-WIDTH: 0px; WIDTH: 300px; DISPLAY: block; HEIGHT: auto; TOP: 147px; LEFT: 62px" class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable ui-resizable" role=dialog tabIndex=-1 aria-labelledby=ui-dialog-title-dialog sizset="0" sizcache008750245918520949="0">
<DIV class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" sizset="0" sizcache008750245918520949="0"><SPAN id=ui-dialog-title-dialog class=ui-dialog-title>Dialog Title</SPAN><A class="ui-dialog-titlebar-close ui-corner-all" role=button href="#"><SPAN class="ui-icon ui-icon-closethick">close</SPAN></A></DIV>
<DIV style="MIN-HEIGHT: 94px; WIDTH: auto; HEIGHT: auto" id=dialog class="ui-dialog-content ui-widget-content" scrolltop="0" scrollleft="0">Dialog Content</DIV>
<DIV class="ui-resizable-handle ui-resizable-n"></DIV>
<DIV class="ui-resizable-handle ui-resizable-e"></DIV>
<DIV class="ui-resizable-handle ui-resizable-s"></DIV>
<DIV class="ui-resizable-handle ui-resizable-w"></DIV>
<DIV style="Z-INDEX: 1001" class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se ui-icon-grip-diagonal-se"></DIV>
<DIV style="Z-INDEX: 1002" class="ui-resizable-handle ui-resizable-sw"></DIV>
<DIV style="Z-INDEX: 1003" class="ui-resizable-handle ui-resizable-ne"></DIV>
<DIV style="Z-INDEX: 1004" class="ui-resizable-handle ui-resizable-nw"></DIV></DIV>

Open in new window

0
 

Author Comment

by:jackjohnson44
ID: 37844593
Thanks.
Instead of defining them like this, isn't there more of a generic way?  Something like $('#maindiv').themerollerStandard();

I'd rather not have to set everything, or make a widget for all divs.  I would think that most web pages have large areas that you don't need to decorate with some sort of dialogue, button, accordion.
0

Featured Post

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question