JSFiddle - React, Tailwind, and code Playground

by Boris Šuška

JavaScript

// funkce == instance objektu 
// alert((function() {}) instanceof Object) // true
function MyJQuery(param) {
    alert("Hello " + param);
}

// Proto muzeme pridat instancni promennou nebo metodu
MyJQuery.find = function(param) {
    alert("Aloha " + param);
}

// Volani funkce
MyJQuery("jQuery");
// Volani metody na funkci
MyJQuery.find("find");

// Stejne tak to dela jQuery:
// $('#id') nebo $.find('#id');