jQWidgets Forums

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 11 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Togglebutton with img #50866

    simcon94
    Participant

    Hi,
    is it possible to set the Togglebutton with images?

    Togglebutton with img #50875

    Dimitar
    Participant

    Hello simcon94,

    You can only initialize jqxToggleButton from input or button elements. However, you can do the following:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="../../scripts/demos.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                // Create a jqxToggleButton widget.
                $("#jqxButton").jqxToggleButton({ width: '200', toggled: true });
            });
        </script>
    </head>
    <body class='default'>
        <button id="jqxButton">
            <img src="../../images/t-shirts/honey-badger-don-t-care.png" /></button>
    </body>
    </html>

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Togglebutton with img #50884

    simcon94
    Participant

    HI,
    that isn’t what i want. I want to change the img with toogle.
    Like a Button On/Off, but not with value….

    Togglebutton with img #50918

    Dimitar
    Participant

    Hi simcon94,

    Unfortunately, this is all we can offer you on the matter. You can, however, check out jqxSwitchButton. It may better suit your requirement.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.