If a link is pressed on my startpage a jQuery Colorbox opens with my new site.
<script type="text/javascript">
$(document).ready(function(){
$(".deletealbum").each(function(){
$(this).click(function(event){
event.preventDefault();
var albumname = $(this).attr('name');
alert(albumname);
$.post('deleteAlbum.php',
{
albumname: albumname
});
});
});
});
</script>
This is my Javascript - Code and below I have links, which look this way
echo "<a href='#' class='deletealbum' id='$Album' name='$Album'> DELETE </a>";
If I press the button, nothing happens in my colorbox, but if i include this page on my start page it works just perfectly.
So why doesn't it work in the colorbox ?