jQWidgets Forums

This topic contains 1 reply, has 2 voices, and was last updated by  support 12 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Button group Posts
  • Button group #14227

    hardcode
    Member

    I have a button group, how do I disable one of the buttons in the group. Example is how do I disable the right button while the other remains active. I tried using the normal jqwidget buttons are disabled if fails to work

    Button group #14266

    support
    Participant

    Hi hardcode,

    Below is a sample which demonstrates how to disable a Button in the Button Group:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttongroup.js"></script>
    </head>
    <body class='default'>
    <div id='content'>
    <script type="text/javascript">
    $(document).ready(function () {
    // Create jqxButton widgets.
    $("#jqxWidget").jqxButtonGroup({ mode: 'default' });
    $('#jqxWidget').jqxButtonGroup('disableAt', 2);
    });
    </script>
    <div id='jqxWidget'>
    <button style="padding:4px 16px;" id="Left">
    Left</button>
    <button style="padding:4px 16px;" id="Center">
    Center</button>
    <button style="padding:4px 16px;" id="Right">
    Right</button>
    </div>
    </div>
    </body>
    </html>

    Best Regards,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.