jQuery UI Widgets Forums Navigation NavigationBar, ToolBar, NavBar Button disabled: true does not work

This topic contains 2 replies, has 2 voices, and was last updated by  ChristianB 9 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Button disabled: true does not work #74984

    ChristianB
    Participant

    Hi JQX-Team,

    is it possible to disabled a ‘custom’ Button in the Toolbar?

    Here my Code:

    $("#toolbar").jqxToolBar({
    	width: '100%', height: 35, tools: 'custom',
    	initTools: function (type, index, tool, menuToolIninitialization) {
    		switch (index) {
    			case 0:
    				var button = $("<div id='custom1'>;-)</div>");
    				tool.append(button);
    				button.jqxButton({ height: 15, width: 20, disabled: true });
    				tool.on('click', function(){
    					alert('i am not disabled');
    				});
    				break;
    			
    		}
    	}
    });

    enjoy your Day
    Christian

    Button disabled: true does not work #74987

    Dimitar
    Participant

    Hello Christian,

    If you wish such a button to be disabled, please initialize it from a button or input element, e.g.:

    $("#toolbar").jqxToolBar({
        width: '100%',
        height: 35,
        tools: 'custom',
        initTools: function(type, index, tool, menuToolIninitialization) {
            switch (index) {
                case 0:
                    var button = $("<button id='custom1'>;-)</button>");
                    tool.append(button);
                    button.jqxButton({
                        height: 23,
                        width: 20,
                        disabled: true
                    });
                    button.on('click', function() {
                        alert('i am not disabled');
                    });
                    break;
    
            }
        }
    });

    Best Regards,
    Dimitar

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

    Button disabled: true does not work #74994

    ChristianB
    Participant

    Thanks a lot Dimitar

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

You must be logged in to reply to this topic.