Advertisement
BinPaste

wp-exclude-emoji not working

Sep 10th, 2015
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.61 KB | None | 0 0
  1. <h3>Plain HTML:</h3>
  2. <div><button class="wp-exclude-emoji"></button></div>
  3. <h3>Added by JS immediately:</h3>
  4. <div class="replace1"></div>
  5. <h3>Added by JS on timeout:</h3>
  6. <div class="replace2"></div>
  7.  
  8. <script>function replaceDiv(divToReplace)
  9. {
  10. var dButtonLeft = document.createElement('button');
  11. dButtonLeft.appendChild(document.createTextNode('◀'));
  12. dButtonLeft.className = 'wp-exclude-emoji';
  13. divToReplace.parentNode.replaceChild(dButtonLeft, divToReplace);
  14. }
  15. replaceDiv(document.querySelector('div.replace1'));
  16. setTimeout(function(){replaceDiv(document.querySelector('div.replace2'));}, 1000);
  17. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement