Jquery bind()/live() within a function
<p>I wrote a little pager which removes and rewrites content. I have a function called after loading the page, it shall be executed after changing the page as well. Because I do not wat to implement the function twice (on initialisation and after changing the page) I tried bind()/live() and a simple function.</p>

<p>The function looks like this:</p>

<pre><code>jQuery('.blogentry').each(function (){
    jQuery(this).click(function(){
        //Clicking on the element opens a layer, definitely works - I tested it
    });
});
</code></pre>

<p>It is executed after initialisation, for executing it after page changes as well I tried the following:</p>

<pre><code>jQuery('.nextPage, .prevPage').click(function changePage(){
    // Changing page and rewriting content
    showEntry();
});
//...
showEntry();
//...
function showEntry(){
jQuery('.blogentry').each(function (){
    jQuery(this).click(function(){
        //Clicking on the element opens a layer, definitely works - I tested it
    });
});
}
</code></pre>

<p>But the function is not executed if put inside a function (<em>lol</em>) and called via showEntry();</p>

<p>Afterwards I tried to bind the function...</p>

<pre><code>jQuery('.nextPage, .prevPage').click(function changePage(){
    // Changing page and rewriting content
    jQuery('.blogentry').bind("click", showEntry);
});
//...
jQuery(this).click(function showEntry(){
    //Clicking on the element opens a layer, definitely works - I tested it
});
</code></pre>

<p>Did not work either. Code after the bind()-line would not execute as well.
I thought maybe it's a problem to bind to an event function, if an event is already given via the parameter so i also tried this:</p>

<pre><code>jQuery('.nextPage, .prevPage').click(function changePage(){
    // Changing page and rewriting content
    jQuery('.blogentry').bind("click", showEntry);
});
//...
function showEntry(){
    //Clicking on the element opens a layer, definitely works - I tested it
});
}
</code></pre>

<p>No success at all. Maybe I cannot call the function from inside the function regarding to the bind()? Maybe I just do not understand the bind()-function at all? I also tried the live() function since it seemed to fit better, as I am rewriting the content all the time. But it had the same effect: none...</p>
