0

I had been just including my corner stamp as the first item, but I now have a need to prepend new items on the fly rather than append them. This causes the corner stamp to be pushed down as items are added.

Does anyone know of a work around for this?

4

1 回答 1

1

after您可以尝试使用角落标记,而不是添加到父 div 。

$('.corner-stamp').after('<div>newElement</div>');

如果您也有没有角印的案例。

if($('.corner-stamp').length){
  $('.corner-stamp').after('<div>newElement</div>');
  $('#container').masonry( 'reload' );
  } 
else{
  $('#container').prepend('<div>newElement</div>').masonry( 'reload' );
  }
于 2012-08-31T01:46:26.627 回答