Witam,
mam problem otóż, robię dodawanie postów przez użytkownika (ala Facebook) i gdy chcę usunąć post to post się usuwa ale po tym nie pokazuje się "dropdown" z innego postu. Pokazuje się on dopiero po odświeżeniu strony. Proszę o pomoc, dodaje skrypt.

skrypt:
  1. <script>
  2.  
  3.  
  4. $(document).ready(function() {
  5.  
  6. //grab all the anchor tag with rel set to shareit
  7. $('a[rel=shareit], #shareit-box').mouseenter(function() {
  8.  
  9. //get the height, top and calculate the left value for the sharebox
  10. var height = $(this).height();
  11. var top = $(this).offset().top;
  12.  
  13. //get the left and find the center value
  14. var left = $(this).offset().left + ($(this).width() /2) - ($('#shareit-box').width() / 2);
  15.  
  16. //grab the href value and explode the bar symbol to grab the url and title
  17. //the content should be in this format url|title
  18. var value = $(this).attr('href').split('|');
  19.  
  20. //assign the value to variables and encode it to url friendly
  21. var field = value[0];
  22. var url = encodeURIComponent(value[0]);
  23. var title = encodeURIComponent(value[1]);
  24.  
  25. //assign the height for the header, so that the link is cover
  26. $('#shareit-header').height(height);
  27.  
  28. //display the box
  29. $('#shareit-box').show();
  30.  
  31. //set the position, the box should appear under the link and centered
  32. $('#shareit-box').css({'top':top, 'left':left});
  33.  
  34. //assign the url to the textfield
  35. $('#shareit-field').val(field);
  36.  
  37. //make the bookmark media open in new tab/window
  38. $('a.shareit-sm').attr('target','_blank');
  39.  
  40. //Setup the bookmark media url and title
  41. $('a[rel=shareit-mail]').attr('href', 'http://mailto:?subject=' + title);
  42. $('a[rel=shareit-delicious]').attr('href', 'http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=' + url + '&title=' + title);
  43. $('a[rel=shareit-designfloat]').attr('href', 'http://www.designfloat.com/submit.php?url=' + url + '&amp;title=' + title);
  44. $('a[rel=shareit-digg]').attr('href', 'http://digg.com/submit?phase=2&amp;url=' + url + '&amp;title=' + title);
  45. $('a[rel=shareit-stumbleupon]').attr('href', 'http://www.stumbleupon.com/submit?url=' + url + '&title=' + title);
  46. $('a[rel=shareit-twitter]').attr('href', 'http://twitter.com/home?status=' + title + '%20-%20' + title);
  47.  
  48. });
  49.  
  50. //onmouse out hide the shareit box
  51. $('#shareit-box').mouseleave(function () {
  52. $('#shareit-field').val('');
  53. $(this).hide();
  54. });
  55.  
  56. //hightlight the textfield on click event
  57. $('#shareit-field').click(function () {
  58. $(this).select();
  59. });
  60. });
  61.  
  62.  
  63. </script>
  64.  
  65. <style>
  66. #shareit-box {
  67. position:absolute;
  68. display:none;
  69. }
  70.  
  71. #shareit-header {
  72. width:138px;
  73. }
  74.  
  75.  
  76. #shareit-body {
  77. width:138px; height:100px;
  78. background:url(images/shareit.png);
  79. }
  80.  
  81. #shareit-blank {
  82. height:20px;
  83. }
  84.  
  85. #shareit-url {
  86. height:50px;
  87. text-align:center;
  88. }
  89.  
  90. #shareit-url input.field{
  91. width:100px; height:26px;
  92. background: transparent url(images/field.gif) no-repeat;
  93. border:none; outline:none;
  94. padding:7px 5px 0 5px;
  95. margin:3px auto;font-size:11px;
  96. }
  97.  
  98. #shareit-icon {
  99. height:20px;
  100. }
  101.  
  102. #shareit-icon ul {
  103. list-style:none;
  104. width:130px;
  105. margin:0; padding:0 0 0 8px;
  106. }
  107.  
  108. #shareit-icon ul li{
  109. float:left;
  110. padding:0 2px;
  111. }
  112.  
  113. #shareit-icon ul li img{
  114. border:none;
  115. }
  116.  
  117.  
  118. </style>
  119.  
  120.  
  121. <a href="#" class="delete_p" style="color:#ff0000;"><img src="hide.png" border="0" /></a>
  122. <a href="#" rel="shareit" style="color:#ff0000;"><img src="wall/images/hide.png" border="0" /></a>
  123. <div id="shareit-box">
  124.  
  125. <div id="shareit-header"></div>
  126. <div id="shareit-body">
  127. <div id="shareit-blank"></div>
  128. <div id="shareit-url"><input type="text" /></div>
  129. <div id="shareit-icon">
  130. <ul>
  131. <li><a href="#" rel="shareit-mail" class="shareit-sm"><img src="images/sm_mail.gif" width="16" height="16" alt="Mail" title="Mail" /></a></li>
  132. <li><a href="#" rel="shareit-delicious" class="shareit-sm"><img src="images/sm_delicious.gif" width="16" height="16" alt="Delicious" title="Delicious" /></a></li>
  133. <li><a href="#" rel="shareit-designfloat" class="shareit-sm"><img src="images/sm_designfloat.gif" width="16" height="16" alt="Designfloat" title="Designfloat" /></a></li>
  134. <li><a href="#" rel="shareit-digg" class="shareit-sm"><img src="images/sm_digg.gif" width="16" height="16" alt="Digg" title="Digg" /></a></li>
  135. <li><a href="#" rel="shareit-stumbleupon" class="shareit-sm"><img src="images/sm_stumbleupon.gif" width="16" height="16" alt="StumbleUpon" title="StumbleUpon" /></a></li>
  136. <li><a href="#" rel="shareit-twitter" class="shareit-sm"><img src="images/sm_twitter.gif" width="16" height="16" alt="Twitter" title="Twitter" /></a></li>
  137. </ul>
  138. </div>
  139. </div>
  140. </div>