Finishing An If Statement
<p>This is a quick question.</p>

<pre><code>&lt;table id="menuStructuresPageList" class="rounded-corner dataTablePageList"&gt;

if ($('.dataTablePageList')) {
</code></pre>

<p>What I want to do is do an if statement that says if the object that has a class of dataTablesPageList also has a id of menuStructuresPageList then .... </p>

<p>But I'm not sure how I would complete the tail end of the if statement.</p>

<p>EDIT: </p>

<p>The point I'm making is this is shared code with many tables so all tables have the class of dataTablePageList but if one of them has the id of a menuStructuresPageList then it needs to do the if part of the statement.</p>

<pre><code>if ($('.dataTablePageList')) {

} else {

var oTable = $('.dataTablePageList').dataTable( {
    "bJQueryUI": true,
    "iDisplayLength": 10,
    "sPaginationType": "full_numbers",
    "aoColumnDefs": [ 
            { "sWidth": "20px", "aTargets": [ 0 ] },
            { "sWidth": "40px", "aTargets": [ -1 ] },
            { "sWidth": "40px", "aTargets": [ -2 ] },
            { "bSortable": false, "aTargets": [ 0 ] },
            { "bSortable": false, "aTargets": [ -1] },
            { "bSortable": false, "aTargets": [ -2 ] },
            { "sClass": "center", "aTargets": [ 0 ] }, 
            { "sClass": "center", "aTargets": [ -1 ] },
            { "sClass": "center", "aTargets": [ -2 ] }  
        ]
});
}
</code></pre>
