JohnnyCash
JohnnyCash

Reputation: 1261

Django Jquery Dialog box when specific radio button selected

How would you get the selected radio button, and if it is a specific option display a dialog box with a message to the user?

Upvotes: 0

Views: 480

Answers (1)

nathanjosiah
nathanjosiah

Reputation: 4459

You have to listen for the change event:

$('#my-select-id').change(function(e){
    if(e.target.value === 'special') {
        displayDialog();
    }
});

Upvotes: 1

Related Questions