Guest User

Untitled

a guest
Oct 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. $.cjTextFx.remove = function(removeAll, objs) {
  2.  
  3. cleanDictionary(removeAll, objs);
  4.  
  5. }
  6.  
  7. function cleanDictionary(removeAll, objs) {
  8.  
  9. if(dictionary.length) {
  10.  
  11. if(!removeAll) {
  12.  
  13. var i = objs.length, j;
  14.  
  15. while(i--) {
  16.  
  17. j = dictionary.length;
  18.  
  19. while(j--) {
  20.  
  21. if(objs[i] === dictionary[j].object) {
  22.  
  23. clean(dictionary[j]);
  24. dictionary.splice(j, 1);
  25.  
  26. break;
  27.  
  28. }
  29.  
  30. }
  31.  
  32. }
  33.  
  34. }
  35.  
  36. else {
  37.  
  38. while(dictionary.length) {
  39.  
  40. clean(dictionary[0]);
  41. dictionary.shift();
  42.  
  43. }
  44.  
  45. }
  46.  
  47. }
  48.  
  49. }
  50.  
  51. function clean(model) {
  52.  
  53. clearTimeout(model.start);
  54. clearInterval(model.timer);
  55.  
  56. var arr = model.array, obj;
  57.  
  58. while(arr.length) {
  59.  
  60. $(arr[0]).stop(true);
  61. arr.shift();
  62.  
  63. }
  64.  
  65. obj = $(model.object);
  66. obj.unbind("click", model.linkHandler);
  67.  
  68. if(model.restore) {
  69.  
  70. obj.empty();
  71. obj.html(model.html);
  72.  
  73. }
  74.  
  75. obj.css("visibility", "hidden");
  76.  
  77. }
  78.  
  79. }
Add Comment
Please, Sign In to add comment