[jQuery] Event complications (beginner level)
Hi All,
I'm having issues with simple event triggering. Here is an excerpt of my code:
$(document).ready(function() {
$('.pendingUsers').load('index.php/meduser/check_pending_users');
setInterval(function() {
$('.pendingUsers').load('index.php/meduser/check_pending_users');
}, 300000);
// initially hide the main content div until a pending user is clicked.
$('#main').hide();
$('.pendingUsers a').click(function() {
$('#main').show();
});
});
The initial $('#main').hide(); works great, my main content area is hidden. However the click() functionality doesn't work in its current state. The DIV is now put back on the screen. Just to re-assure everyone, here's an excerpt from the HTML:
<div id="main-top"></div>
<!-- POPULATE USER INFORMATION HERE -->
This is a test.
</div> <!-- main-content -->
Thank you for any input.
- sf