jQWidgets Forums

jQuery UI Widgets Forums Editors Button, RepeatButton, ToggleButton, LinkButton Get current jqxToggleButton state

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Peter Stoev 12 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Get current jqxToggleButton state #22650

    Jazz
    Participant

    Probably a stupid question, but how does one get the current state of a toggle button?

    I have a situation where I want to clear the toggled state on a bunch of toggle buttons, so only want to execute the toggle method if the button is currently not toggled on.

    object.jqxToggleButton(‘val’) returns ‘undefined’.

    Ideas?

    Get current jqxToggleButton state #22652

    Jazz
    Participant

    Nevermind. I dove into the jqxbuttons.js source and found that jqxToggleButton has ‘check’ and ‘unCheck’ methods available. They really should be in the API docs as they are incredibly useful. Solved my problem.

    Still wouldn’t mind there being a way to get the current state though. Maybe an ‘isChecked’ or ‘isToggled’ method can be added. Looking at it all that needs is a method to return the value of ‘this.toggled’. Essentially one line of code. Feature request? 😉

    Get current jqxToggleButton state #22661

    Peter Stoev
    Keymaster

    Hi Jazz,

    Thank you for the valuable feedback! We appreciate it!

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.