Rolf and Angel,
OK, I’m close. Rolf, I’m taking a JS shortcut with your function, but I think
it’s valid.
1) $("#jmolApplet0_console").css("top",20);
$("#jmolApplet0_console").css("left",20);
$("#jmolApplet0_console").css("position","fixed")
Obediently, snaps the console to 20, 20, but it’s not position:fixed. Rather it
click-touch/ leaps, and then drags.
2) A desperate:
$("#jmolApplet0_console").parent().css("top",20);
$("#jmolApplet0_console").parent().css("left",20);
$("#jmolApplet0_console").parent().css("position","fixed”)
Inadvertently, and obediently, proves molApplet0_console is in my page. All my
page content jumps to 20, 20, fixed.
3) jmolApplet0_console.innerText
Unexpectedly, shows me that jmolApplet0_console.innerText is apparently only
the header bar.
" close help
"
Otis
--
Otis Rothenberger
o...@chemagic.org
http://chemagic.org
> On Jul 28, 2017, at 12:56 PM, Rolf Huehne <rolf.hue...@leibniz-fli.de> wrote:
>
> 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
>
------------------------------------------------------------------------------
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