?
Solved

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

Posted on 2012-04-13
2
Medium Priority
?
297 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
2 Comments
 
LVL 20

Accepted Solution

by:
Proculopsis earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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)
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

839 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