facebook

Help with Toggle Widget

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #331516 Reply

    Unknown Author
    Participant

    I simply cannot get the state of a Toggle widget nor can I change its state using JavaScript/Jquery.

    I am following your “Working with Widgets” guidance and it’s simply not working. When I try to grab the state of a Toggle and throw it into localstorage, the value is “undefined”. I’ve followed various threads here talking about controlling Toggles. Nothing’s working. I have no design files to send you, as it’s simply one toggle widget on an otherwise empty design.

    Help!
    -1TC

    #331591

    Unknown Author
    Participant

    This may have gotten lost in the pile of weekend questions…

    #331619

    @1thinchip,

    Please try with the next snippet code:

    $(‘input[name=”toggle2“]’).is(‘:checked’)

    Will return true if togle is active and false on oposite case.

    #331620

    Unknown Author
    Participant

    Thanks. Will try it later on.

    How do I change the state of a toggle using Javascript?

    -1TC

    #331621

    @1thinchip,

    Just tried next code and worked great.

    $("input[name='toggle1']").attr('checked',true);
    $("input[name='toggle1']").attr('checked',false);
Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Help with Toggle Widget

You must be logged in to post in the forum log in