JSFiddle - React, Tailwind, and code Playground

by davestein

HTML

This is a demo in 1.4.4. It disable will fire properly in 1.4 but not in 1.5 or 1.6. Bug or working as intended?<br />

<select id="myselect">
    <option value="">Foo</option>
</select>

<div>
    <input type="button" value="enable" />&nbsp;&nbsp;
    <input type="button" value="disable" />
</div>

JavaScript

$('#myselect').live('disable enable', function( e ) {
 
    $('body').append( 'Live change state: ' + e.type + '<br />');  
    
});




$('input[type=button]').bind( 'click', function(e) {
    
    var disabled = true;

    if ( this.value == 'enable' ) {
        disabled = false;
    }
    
    $('#myselect').attr( 'disabled', disabled ).trigger( this.value );
    
    
    
    
});