wasap.js • Demos

Demo area • Mobile-only
Click and edit the destination phone on the fly

Source

<span data-whatsapp="5215585420898">Click and edit the destination phone on the fly</span>
wasap.init({
  elementCallback: function(el, wasap_send){
    el.addEventListener('click', function(e){
      e.preventDefault();
      var prompt_phone = prompt('Enter a number, or use the default', el.dataset.whatsapp);
      if(!prompt_phone) return;
      wasap_send({ phone: prompt_phone });
    });
  }
})

More demos

  1. Basic
  2. Predefined message
  3. Enable on all platforms
  4. Multiple elements
  5. Prompt for a message
  6. Change destination number on the fly
  7. Advanced demo