How to use simple modal jquery plugin to get a dialog of table? I want to show a popup when I click on a link which is basically done by jquery plugin simple modal.
In my template.php file,

function theme_name_preprocess_page(&amp;$variables) {
    drupal_add_js(drupal_get_path('theme', 'theme_name') .'/js/jquery.simplemodal.1.4.1.min.js');

    drupal_add_js(drupal_get_path('theme', 'theme_name') . '/js/theme_name.js');

}

function theme_name_process_views_view_field(&amp;$vars) {
// $plus_icon is a variable defined inside this function. 
 $output = "&lt;a id='abc-modal-$nid' class='abc-modal' href='#'&gt;$plus_icon&lt;/a&gt;";
 $output .= "&lt;div id='abc-modal-content-$nid' class='abc-modal-content'&gt;&lt;/div&gt;";
 $vars['view']-&gt;result[$key]-&gt;field_field_flag[0]['rendered']['#markup'] = $output;
}


And in the theme_name.js file

(function($) {
    Drupal.behaviors.abc = {
('.abc-modal').click(function (e) {
                var key = $(this).attr('id').replace(/^abc-modal-(\d+)$/, "$1");
                $.post(Drupal.settings.basePath + 'queue-log', {nid : key},
                       function(data) {
                           if (data) {
                               $('#abc-modal-content-'+key).html(data.html);
                               $('#abc-modal-content-'+key).modal();
                           }
                       }, "json" );
                return false;
            });


.....
How can I get the simple modal jquery plugin working so that when I click on a link mentioned in $output variable() I get a popup displaying contents.
Here is snippet which can be helpful for you to add open the link in simple modal plugin

// Get the click action on link
$('.abc-modal').click(function() {

// Get href attribute.
  var href = jQuery(this).attr('href');

 /*  Three things here
 1. Append a div to the pop-up body
 2. Keep it hidden.      
 3. load the content on the link to the div(#content is the id from where you want to load the content to the pop-up) */

      $('&lt;div id="any-id-you-want"&gt;&lt;/div&gt;').hide().appendTo('body').load(href+' #content', function(){
        }).modal({
        overlayClose: true, 
        autoResize: true, 
        minHeight: 600, 
        minWidth:800 , 
        opacity:80,
        overlayCss: {
          backgroundColor:"black"
        }
      });
      return false;
    });