I am having problems with this code:
$(document).ready(function(){
$('#detalji').hide();
$('a.linkdetalji').click(function() {
var top = $(this).offset().top;
var left = $(this).offset().left;
var partnum = $(this).attr('href');
/// Problem start
$.post("artikli-detalji.php", { varijabla: partnum }, function(data){
$('#sadrzaj').empty().append(data);
});
///Problem end
$('#detalji').css({ 'top':top, 'left':left, 'position':'absolute' });
$('#detalji').fadeIn(400);
return false;
});
$('a#linkdetaljiclose').click(function() {
$('#detalji').fadeOut(760);
return false;
});
});
The problem is that while i use append(data) the effects are slow (lagging).. when i remove whole $.post the effects are smooth...
Now i would like to do next thing...
i would like to make the div text say "loading" until whole $.post thing is done... ($.post is getting a lot of data,that is why its laggy)..
I hope you understand.. if not
I would like to get data from "artikli-detalji.php" and while i am getting data i want some text to say "loading..." then when i get all the data
i want to display the data in div...
Thank you for help!

New Topic/Question
Reply


MultiQuote




|