This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Auto open Widget
#1
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
Reply
#2
(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'});
Jean-Marc
Reply
#3
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
Reply
#4
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();
});
Reply


Forum Jump: