I think perhaps the only classes the menu uses are these:

class="jmolPopupMenu ui-menu ui-widget ui-widget-content ui-corner-all"
class="ui-corner-all"
class="ui-menu ui-widget ui-widget-content ui-corner-all"
class="ui-menu-icon ui-icon ui-icon-carat-1-e"
class="ui-menu-item"
class="ui-state-disabled ui-menu ui-widget ui-widget-content ui-corner-all"
class="ui-state-disabled ui-menu-item"


If so, that should be an easy task.

Bob











On Sat, Sep 28, 2013 at 9:31 AM, Robert Hanson <hansonr@stolaf.edu> wrote:
What I was thinking is that the preferred form is to do something like:

$("#JmolMenu").css({width:"10px",height:"1px"})

where #JmolMenu is a Sizzle selector, allowing very specific processing of the css.

But I guess we're not changing† the CSS, just defining it, so what makes sense is to define it separately and to, as you say, make it specific to Jmol and adjustable by users. I'd rather not include a CSS file in the distribution, though. Maybe something in Info.





On Sat, Sep 28, 2013 at 3:31 AM, Angel HerrŠez <angel.herraez@uah.es> wrote:
On 27 Sep 2013 at 17:45, Robert Hanson wrote:
> Give me a chance to learn how changing the CSS in jQuery is supposed to be done. I'm sure it's
> not with style sheets.

Why not?

As far as I can see what it's being done now is writing css properties into the tags when these are created. Nothing about jQuery there, just plain JS + CSS.
I was in fact able to override several css rules by adding them in my page head, some times !important was needed to force. If I do the same by editing the coremenu.js file, it works too.
I'm sure that jQuery has methods to apply css rules on the fly to elements or classes, but that's just another way to do the same.

As I said, I see value in having a separate clear declaration of css rules being used. There are situations (like using some jQuery modules or extensions, like accordion, lightboxes etc.) when one may find problems that need tuning. As a quite basic example, one of my pages used a css rule for hr tags and that permeated into the popup menu separators.
Also, z-index values of several thousand are being used, intending the JSmol to be on top of anything, but you may need that e.g. an alert-type box goes over that. I would use lower z-index values. Why should the JSmol object be forced on top? There is a need to its internal divs ot be z-ordered, that's true, but only relative to one another, not to the whole page.

Also, one would like to customize the style of popup to match the page style, maybe. Not something that will be used routinely, of course. Just more clear.

For example, in the current setup the css rules are defined for general-purpose jQuery UI elements, not specifically for the JSmol popup menu. That's one of the things I have fixed.

I intend to set up a page that uses jQuery UI for other elements in addition to JSmol so we can see what interferences arise.† But I haven't found the time yet.

Have you had a look at the popu menu compacting?
It took me some effort to find out which css rules I needed to modify to achieve that, because they are embedded in the compressed js code; that's an example.


††

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers




--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900




--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900