Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 28th, 2012  |  syntax: None  |  size: 0.56 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Display same class only once with jquery
  2. function callMeOften()
  3. {
  4.      $.ajax({
  5.         method: 'get',
  6.         url : '1.php',
  7.         dataType : 'text',
  8.         success: function (text) {
  9.             $('#updateMe').html(text)  ;
  10.         }
  11.     });
  12. }
  13. var holdTheInterval = setInterval(callMeOften, 500000);
  14. $(".<? echo $userRank['userID'] ?>").appendTo("#statMSG1");
  15. });
  16.        
  17. <div id="33" class="33">Test</div>
  18. <div id="33" class="33">Test</div>
  19. <div id="45" class="45">Test2</div>
  20. <div id="33" class="33">Test</div>
  21.        
  22. $("#updateMe").html($(text).filter(".33").eq(0));​