Click on any label must execute JQuery function
<p>I have a side-menu with labels under it define the menu-items and are dynamically generated. When user-clicks on any item, following code must execute:</p>

<pre><code>$("#label").click( function(event) ){
    $.get(
        "../../phplibraries/productlist.php",
    {
        ControlName: 'ulCategoryName',
        Category: 'Beverages'
    },
    function(data) {
        $('#divList').html(data);
    });
});
</code></pre>

<p>I am not following how to capture click on any label that is actually a menu item.</p>

<p><strong>-- Edited --</strong></p>

<p>The HTML of side menu is as below:</p>

<pre><code>&lt;?php
    error_reporting(E_ALL^E_NOTICE);
    ini_set('display_errors', '1');

    require_once('dbaccess.php');

    $ulName = $_GET['ControlName'];
    $category = $_GET['Category'];

    $result=mysql_query("SELECT pname FROM products WHERE category='".$category."'");
?&gt;
&lt;ul id="&lt;?php echo $ulName; ?&gt;" name="&lt;?php echo $ulName; ?&gt;"&gt;
&lt;?php while($row=mysql_fetch_array($result))
{ ?&gt;
    &lt;label id="lblCategory" name="lblCategory" style="font-size:medium;"&gt;&lt;?php echo $row[1]; ?&gt;&lt;/label&gt;&lt;br /&gt;
    &lt;!--&lt;li style="font-size:medium;"&gt;&lt;?php echo $row[1]; ?&gt;&lt;/li&gt;--&gt;
&lt;?php } ?&gt;
&lt;/ul&gt;
</code></pre>
