Skip to content

Instantly share code, notes, and snippets.

View JuanPabloDelCastillo's full-sized avatar

Juan Pablo del Castillo JuanPabloDelCastillo

  • Globant
  • San Miguel de Tucumán
View GitHub Profile
@JuanPabloDelCastillo
JuanPabloDelCastillo / README.md
Created September 14, 2017 16:10 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
function ObserverMovieList(){
this.observerMovieList=[]
}
ObserverMovieList.prototype.add = function(obj){
return this.observerMovieList.push(obj);
};
ObserverMovieList.prototype.count = function(){
return this.observerMovieList.lenght;
};
ObserverMovieList.prototype.get = function(index){
<!doctype html>
<head>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
<script src="http://cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.0.beta.6.js"></script>
<script id="template" type="text/x-handlebars-template">
<div>Test Template</div>
<p>Name: {{name}}</p>
</script>