jeudi 31 mars 2016

Hidden input field value should be changed according to the drop box selection

This my script code. There's something wrong with it.

$(function() {
    $('#type').on('change', function() {
        if ($('#type').val('Workshop'))
            $('#color').val('Orange'));
        else if ($('#type').val('Social'))
            $('#color').val('Green');
        else if ($('#type').val('Other'))
            $('#color').val('Red'));

    });
});



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1ql6PO0
via IFTTT

Aucun commentaire:

Enregistrer un commentaire