Simple pre ES6 Class

Change class name on click in jQuery

by Ben Clayton

HTML

<p>Video Class Shell - look in console</p>

JavaScript

// find elements


function videoPlayer(s){
	this.src = s;
  this.hello = function (){
  	console.log("I will play ",xthis.src)
  }
}


var f = new videoPlayer("one");
var f2 = new videoPlayer("two");


f.hello();
f2.hello();