Example:

<li class="sibling" id="id"><a>Text</a></li>

$( "#id" ).click(function() {
  $.getScript('https://code.jquery.com/ui/1.12.0/jquery-ui.min.js', function() {
    $('<link/>', {
       rel: 'stylesheet',
       type: 'text/css',
       href: '//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css'
    }).appendTo('head');
    $('body').append('<div style="display:none"><div id="dialog" title="Title" style="background-color: lightgreen;"><p>Text</p></div></div>')
      $( "#dialog" ).dialog();
  });
});

 

en_USEnglish