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.

Autosize widget
#1
Hi!

I have Menu Widget that contains multiple buttons that open another widgets. When i work with PC it works fine, but when I work with iphone the widgets don't autoscale.

If i create a button outside of menu widget to open the same widget, the widget get autoscale.

What can i do? Is ther a function to do this?

Thanks!
Reply
#2
Resolved with Edgars help.

I had:

  $('.Screens').on('vclick', function() {
    $("#widget-47").removeClass("hide");
    $("#widget-29").addClass("hide"); 
  });

  $('.TempTec').on('vclick', function() {
    $("#widget-48").removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Alimentacions').on('vclick', function() {
    $("#widget-49").removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Apagat').on('vclick', function() {
    $("#widget-50").removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Crepuscular').on('vclick', function() {
    $("#widget-62").removeClass("hide");
    $("#widget-29").addClass("hide");
  });     

Replaced with:

$('.Screens').on('vclick', function() {
    $("#widget-47").appendTo('.widgets').removeClass("hide");
    $("#widget-29").addClass("hide");
    //$('.Screens').trigger('vclick')
  });

  $('.TempTec').on('vclick', function() {
    $("#widget-48").appendTo('.widgets').removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Alimentacions').on('vclick', function() {
    $("#widget-49").appendTo('.widgets').removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Apagat').on('vclick', function() {
    $("#widget-50").appendTo('.widgets').removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Crepuscular').on('vclick', function() {
    $("#widget-62").appendTo('.widgets').removeClass("hide");
    $("#widget-29").addClass("hide");
  });

Lot of thanks Edgars!
Reply


Forum Jump: