Get class name dynamically with jquery
<p>I am trying to get this class name dynamically in jquery:</p>

<pre><code>echo "&lt;div id=\"maini\" class=\"type_" .$category. " start_" .$adSize. " color_" .$color. "\"&gt; \n";
     echo " " . $siteName . " \n";  
echo "&lt;/div&gt; \n";
</code></pre>

<p>as you can see the class name is generated with PHP.</p>

<p>I need the class name for this snippet of code. But what I tried does not work -> $("div." + this.id). :</p>

<pre><code>    $(document).ready(function() {
        maini_s = $("div." + this.id).remove();
        num_of_arts = maini_s.length;
        ipp = 3;
</code></pre>

<p>Here is the entire js file in case you need to see the other elements before.</p>

<pre><code>var maini_s;
var num_of_arts;
var ipp;

function handlePaginationClick(new_page_index, pagination_container) {
    var pc = $(pagination_container);
    pc.children('div#maini').remove();
    for(var i=new_page_index*ipp; i &lt; (new_page_index+1)*ipp ;i++) {
        if (i &lt; num_of_arts) {
                pc.append(maini_s[i]);
        }
    }
    return false;
}

$(document).ready(function() {
    maini_s = $("div." + this.id).remove();
    num_of_arts = maini_s.length;
    ipp = 3;


    // First Parameter: number of items
    // Second Parameter: options object
    $("#News-Pagination").pagination(11, {
        items_per_page:ipp, 
        callback:handlePaginationClick
    });
});
</code></pre>
