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?
http://biomodel.uah.es/Jmol/pop-up_menu/compare1.png
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