Using TogetherJS

By  on  

TogetherJS

Last week I highlighted five awesome Mozilla technologies that most people have never heard of.  Before the Mozilla Summit in Santa Clara, even I (a Mozilla employee)  had not heard of a few of them.  One of the projects I was most impressed by was TogetherJS, a project created to allow for simple collaborative development between any number of users.  My favorite attribute of TogetherJS is that it's so incredibly easy to implement.  Let me show you how!

The HTML

Implementing TogetherJS only requires a script tag and an opt-in button to initiate collaboration:

<script src="https://togetherjs.com/togetherjs-min.js"></script>

<button onclick="TogetherJS(this); return false;">Collaborate!</button>

The TogetherJS(this) call initiates the library, displaying an opt-in dialog, and then users can see where other users place their cursor, click, change form fields, and modify page contents. The updates can be anonymous (yay privacy!) and effective!

What an incredible utility -- never has instant collaboration been so easy!  TogetherJS is a another example of how Mozilla is fighting to make not just development easier, but collaboration of all kinds easier.  The epic development sandbox, JSFiddle, has implemented TogetherJS to allow for easily collaboration and code experimentation.  Leave it to Mozilla to create an epic collaboration tool that's easy to implement!

Recent Features

  • By
    CSS Animations Between Media Queries

    CSS animations are right up there with sliced bread. CSS animations are efficient because they can be hardware accelerated, they require no JavaScript overhead, and they are composed of very little CSS code. Quite often we add CSS transforms to elements via CSS during...

  • By
    fetch API

    One of the worst kept secrets about AJAX on the web is that the underlying API for it, XMLHttpRequest, wasn't really made for what we've been using it for.  We've done well to create elegant APIs around XHR but we know we can do better.  Our effort to...

Incredible Demos

  • By
    CSS Animations Between Media Queries

    CSS animations are right up there with sliced bread. CSS animations are efficient because they can be hardware accelerated, they require no JavaScript overhead, and they are composed of very little CSS code. Quite often we add CSS transforms to elements via CSS during...

  • By
    Xbox Live Gamer API

    My sharpshooter status aside, I've always been surprised upset that Microsoft has never provided an API for the vast amount of information about users, the games they play, and statistics within the games. Namely, I'd like to publicly shame every n00b I've baptized with my...

Discussion

  1. Does Jsfiddle activate it by keyboard shortcut as well as by link? Numerous times its rather annoyingly popped up while I’ve been speed typing or quickly hitting crtl shortcuts. On an old dog of a machines like mine its actual pretty laggy.

  2. Nils

    that’s just like towtruck, is it?

  3. Good
    this was a good post! Handbag Coach Online http://kpmpacks.in/handbag-coach-online.html

  4. Hi David,

    You might be interested in trying out surfly.com: it is similar to togetherjs but requires no modifications to the website and works with signed in sessions.

  5. zip

    To Denis.

    But your version doesn’t take parallel interaction, only view!

  6. Rahul

    can we implement drag and drop functionality in togetherjs application

  7. Jack

    Hi David,
    This example does not seem to work. Is the Mozilla TogetherJS still active?

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!