Hello,
I've got an overlay on my website which loads up when a button is clicked. Once the button it clicked, it parses a PHP file into a div which generates the content to be shown in the div. However, I can't seem to get the jQuery to work on buttons which are imported unless I call another Javascript file while populating the div. Does anyone know how I can get this so that it will work weather the buttons are there as the page is loaded or after extra content is brought in?
I'm presuming it's due to the
$(document).ready(function(){
});
Current jQuery
$(document).ready(function() {
$('.CloseOverlay').click(function() {
$('.OverlayContainer').hide();
});
$('.Approve').click(function() {
var UserID = $(this).val();
var Status = "GetData";
$.post('/Admin/Users/Verified/approveUser.php', { UserID: UserID, Status: Status }, function(data) {
$('.OverlayWrapper').html(data);
});
$('.OverlayContainer').show();
});
});
P.S - I'm pretty shocking at jQuery/Javascript!
Thanks in advance,
Andy