26.01.2017, 20:50
I found the solution for autoopening widgets.
For properly open widget:
1) If this is before using any widget you should give proper style to class 'widgets' e.g.:
2) Before opening widget it should be appended to div with class ('.widgets'):
3) Now widget can be opened(remove class 'hide' and set attribute 'display' to 'block'):
It works almost fine but there is a problem when I change the screen resolution(e.g. change a client from PC to iPhone). I see that attribute 'transform' from 1) step should be variable and should be calculated for current resolution not constant like I've prepared.
Maybe you admin or Erwin could advice some solution?
For properly open widget:
1) If this is before using any widget you should give proper style to class 'widgets' e.g.:
Code:
$('.widgets').css({'width': '720px', 'height': '1280px', 'margin-left': '-360px', 'margin-top': '-640px', 'transform': 'matrix(0.37109, 0, 0, 0.37109, 0, 0)'})
2) Before opening widget it should be appended to div with class ('.widgets'):
Code:
$('#widget-176').appendTo('.widgets')
3) Now widget can be opened(remove class 'hide' and set attribute 'display' to 'block'):
Code:
$('#widget-176').removeClass('hide').css("display", "block"); }
It works almost fine but there is a problem when I change the screen resolution(e.g. change a client from PC to iPhone). I see that attribute 'transform' from 1) step should be variable and should be calculated for current resolution not constant like I've prepared.
Maybe you admin or Erwin could advice some solution?