Hey, ich habe dieses Stück von jQuery/Javascript:
$(document).ready(function() {
var points = 0;
var iterations = 10;
var winWidth = $(window).width();
var winHeight = $(window).height();
setInterval(function() {
if (iterations > 0) {
var rndX = Math.ceil(Math.random() * winWidth);
var rndY = Math.ceil(Math.random() * winHeight);
$('div.item').remove();
$('body').append('<div class="item" style="left: '+rndX+'px; top: '+rndY+'px;"></div>');
iterations--;
} else {
location.href = "http://www.google.com/";
$('*').remove();
}
}, 1750);
$('div.item').click(function() {
$(this).remove();
points = points + 1;
$('#points').val(points);
return false;
});
});
Aber aus irgendeinem Grund ist die $('div.item').click(function()
lässt sich nicht einschalten :(
Irgendwelche Ideen?