class Button { constructor ($element) { this.$element = $element; this.coords = { x: 0, y: 0, w: 0, h: 0 } } } Button.prototype.setCoords_but = function(x, y, w, h) { this.coords = { x: x, y: y, w: w, h: h } this.$element.offset({ top: this.coords.x, left: this.coords.y }); this.$element.css({height: this.coords.h, width: this.coords.w}); } var button_proverka = new Button($('#proverka')); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <body> <button id="proverka">ΠΡΠΎΠ²Π΅ΡΠΊΠ°</button> <button id="delete">ΠΡΠΈΡΡΠΈΡΡ</button> <button id="table_ist" >ΠΠΎΡΡΡΠΎΠΈΡΡ</button> </body> The question is: is it possible to describe the class in a separate file and call it in another file? If so, then how! and the following: how you can change the style of the button when you hover the mouse and pressing the button (this should be described in the class)