I have a div element where a file is being loaded every 10500 miliseconds;
index.php
...
<div class="loadHere"></div>
...
code that loads every few seconds.
setInterval(
function ()
{
$('.loadHere').unload().load('filetoload.php').fadeIn('slow');
}, 10500);
filetoload.php
<a href="#" class="testbtn">test</a>
<input type="hidden" value="1234" class="hiddenelement"/>
and this is what i'm trying to do but isn't working:
$(document).on('click','.testbtn',function(event)
{
event.preventDefault();
var xyz = $('.hiddenelement').val();
alert(xyz);
});