Getting issue in display dialog box using jquery

This is how I am trying to display the dialog box box

         if(obj[1] == 1){
           var popUpList = $('<div><input type="radio">A<br><input type="radio">B<br> 
                                                     <input type="radio">C</div>');
             popUpList.dialog();
          } else {
           //
          }

but its not working , how can I fix it ?

Are there any errors in the console?

Otherwise, please add a runnable demo that demonstrates your problem.