Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. discardElement: function(element) {
  2. var jqGCID = 'jqGarbageCollector';
  3. var jqGC = document.getElementById(jqGCID);
  4. if (!jqGC) {
  5. jqGC = document.createElement('div');
  6. jqGC.id = jqGCID;
  7. jqGC.style.display = 'none';
  8. document.body.appendChild(jqGC);
  9. }
  10.  
  11. // place the element to the Garbage Collector
  12. // and clear it's HTML contents
  13. jqGC.appendChild(element);
  14. jqGC.innerHTML = '';
  15. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement