Logic Machine Forum
Auto open Widget - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Auto open Widget (/showthread.php?tid=1460)



Auto open Widget - mischa - 22.06.2018

Hi,

I want to open a widget on page load, 
found this on the forum    $("#widget-1").removeClass("hide");

the widget opens on page load, but is totally out of proportions.

how can i fix this?

Thanks,

 Mischa


RE: Auto open Widget - JMM - 23.06.2018

(22.06.2018, 18:01)mischa Wrote: Hi,

I want to open a widget on page load, 
found this on the forum    $("#widget-1").removeClass("hide");

the widget opens on page load, but is totally out of proportions.

how can i fix this?

Thanks,

 Mischa
Hi,
try this


Code:
$('#widget-1').css({'display':'block', 'opacity': '1', 'transform': 'perspective(800px)', 'top': '200px', 'left': '500px'});



RE: Auto open Widget - mischa - 23.06.2018

When I try the above sample the styles get implemented but overwritten.
As far as I know, the inline styles whether implemented hardcoded in the HTML or through Javascript must be the last in line of the styles(sheets).

But seems this is not the case with the Homelynk/Logic Machine.
I have tried 3 different browsers to rule out any browser specific issues.

Mischa


RE: Auto open Widget - admin - 25.06.2018

If you have this widget on the first page that is shown, you can simply simulate click on object that shows the widget. Set Additional classes to widget-autoopen and add this code to Custom JavaScript:
Code:
$(function(){
  $('.widget-autoopen').click();
});