1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

(ASK) Button on/off JS

Discussion in 'HTML & JavaScript' started by irfan666, Oct 27, 2015.

  1. irfan666

    irfan666 Newbie

    Joined:
    Oct 3, 2015
    Messages:
    10
    Likes Received:
    0
    Hi i have problems how to make js script for trigger on/off . This is screenshot that i have, i want to show my web into chrome app extension with autoload impression and auto click with random delay time . Please help me
     

    Attached Files:

    • cek.png
      cek.png
      File size:
      183 KB
      Views:
      57
  2. zotohost

    zotohost Registered Member

    Joined:
    Oct 25, 2015
    Messages:
    71
    Likes Received:
    4
    I am not sure what exactly you want. But may be this will help.

    var event; // The custom event that will be created

    if (document.createEvent) {
    event = document.createEvent("HTMLEvents");
    event.initEvent("name-of-custom-event", true, true);
    } else {
    event = document.createEventObject();
    event.eventType = "name-of-custom-event";
    }

    event.eventName = "name-of-custom-event";

    if (document.createEvent) {
    element.dispatchEvent(event);
    } else {
    element.fireEvent("on" + event.eventType, event);
    }
     
  3. revproxy

    revproxy BANNED BANNED Jr. VIP Premium Member

    Joined:
    Nov 20, 2015
    Messages:
    396
    Likes Received:
    100
    Gender:
    Male
    i like this one:
    http://www.bootstrap-switch.org/