Turn of topPanel by javascript

Hi,
I want to set “topPanel” display: none by default, but I can’t call it from OnPageLoad -> Link to external URL
I’ve tried this code:
javascript:$('#topPanel').css("display","none");
and
javascript:document.getElementById("topPanel").style="display:none";
and
javascript:document.getElementById( 'topPanel' ).style.display = 'none';
without any results.

I don’t want to change url to hide this panel

Hi!

Is this an Axure widget you are trying to hide? Try this selector:

$('[data-label="topPanel"]')

no, this is element of preview navigation (grey top bar in preview).

Oh, of course. This just now worked for me in the console:

$('#topPanel').css("display","none");

But I see that’s exactly what you have above.

now it works, strange thing… :grin:

Edit: it isn’t working, my mistake.