[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2012-04-13
2
Medium Priority
?
295 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 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

656 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