On or Off switch (Toggle Switches – IOS7Switch) from javascript function

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10035184
    rgr
    Participant

    When click a toggle switch it does a ‘toggle’ action.
    I have developed a function to control something else, then i change the final state of the toggle switch.

    I don’t know how to force On or Off muy switch from a javscript function.

    Can you help me?

    Thanks in advance (Great Template!!!)


    #10035190
    Support
    Keymaster

    Hello, thanks for your purchase and the kind words!

    You can trigger a click in the switch:

    $('[data-plugin-ios-switch]').prev('.ios-switch').trigger('change');

    We hope this helps!

    Please try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.

    If you are satisfied with Porto Admin and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads


Viewing 2 posts - 1 through 2 (of 2 total)

This topic is marked as "RESOLVED" and can not rceive new replies.