I am having an issue with jquery in Chrome and Safari, the script is working fine in mozilla and opera.
Please check this link http://phpmagic.info/jquery/
When you click on the button, all the boxes should go down, then the value in the textare comeup in the first box, and same should happen as many times you click on the button, This is working fine in Mozilla and Opera but not is Chrome and safari (also in IE6), In these browsers no new boxes come down, only existing
Please give me solution (please check the source code):
<script language="javascript" src="jquery-1.4.2.min.js"></script>
<script language="javascript">
$(document).ready(function() {
var top = 0;
$('#contents div').each(function(index, val) {
$(this).css('top', top + 'px');
top = top + 61;
});
$('#btn').bind('click', function() {
$('#contents div').each(function(index, val) {
var newtop = parseInt($(this).css('top')) + 61;
//$(this).css('top',newtop +'px');;
$(this).animate({
top: newtop + 'px'
}, 800, function() {
//
});
});
$('#contents div:first').before('<div class="link">' + document.getElementById('val').value + '</div>');
});
})
</script>