Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.00 KB | None | 0 0
  1. (function() {
  2.     'use strict';
  3.  
  4.     var threads = $("#threads").find($(".threadstatus"));
  5.  
  6. threads.each(function(){
  7.         $(this).append(`<span class="check_thread" style="border: 1px solid black; background-color: lightgray; font-size: 10px;">Check</span>`);
  8.     });
  9. })();
  10.  
  11. $(".check_thread").click(function(){
  12.     var title = $(this).parent().parent().find($(".title"));
  13.     title.toggleClass("checked");
  14.     checkThread(title);
  15. });
  16.  
  17. function checkThread(title){
  18.  
  19.  
  20.     var dblEvent = new MouseEvent('dblclick', {
  21.         'view': window,
  22.         'bubbles': true,
  23.         'cancelable': true
  24.     });
  25.     title.html("[⁦✔️⁩] -- " + title.text());
  26.     document.getElementsByClassName("checked")[0].dispatchEvent(dblEvent);
  27.     title.toggleClass("checked");
  28.  
  29.     console.log(title);
  30.  
  31.  
  32.     setTimeout(function(){
  33.         vB_ThreadTitle_Editor = new vB_AJAX_TitleEdit(title[0]);
  34.         vB_ThreadTitle_Editor.restore();
  35.     }, 1000);
  36.     //Add function that will execute 'Enter' keypress
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement