Am 28.07.17 um 18:35 schrieb Otis Rothenberger:
All,

I had some confused wording in my previous note!

Here’s my dilemma expressed more concisely: If the console is visible,
then the following have no affect:

$("#JmolApplet0_console").css("position","fixed”);

$("#JmolApplet0_console").css("position","fixed", "important");

This is true with or without my adding <div
id=JmolApplet0_console></div> to my page.

Also, $("#JmolApplet0_console").length equals zero, which suggests that
the div of that name does not exist.

Again, this is all with the console visible.

It does work for me in JSmol 14.18.1 (Javascript). My guess would be that the applet ID is not correct. Maybe a case problem "jmolApplet0"?

In the following example the 'console' function is redefined and takes four parameters (the last two must be provided in quotes):

1) X-position
2) Y-position
3) position mode ("fixed", "absolute")
4) applet ID

My applet ID is "jmolJSnet3D".
It works for me if the console is closed or already open.

--- Example -----
function console(x,y,mode,appletID) {
  if ("" + x == "") {
    x = 20;
  }
  if ("" + y == "") {
    y = 20;
  }
  if (mode == "") {
    mode = "absolute");
  }
  if (appletID == "") {
    appletID = "jmolApplet0";
  }
  console;
command = '$("#' + appletID + '_console").css("top",' + x + '); $("#' + appletID + '_console").css("left",' + y + '); $("#' + appletID + '_console").css("position","' + mode + '");';
  javascript @command;
}

console(20,20,"fixed","jmolJSnet3D");
-------------

Regards,
Rolf

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to