Have you been creating your own classes in pure JavaScript? What if you neeed a private method? How to create them? So finally you can access init() but cannot access prvMethod(). It has only access into MyClass() function scope.
Author Archives: Piotr Sikora
Pure CSS only collapsible elements. How to create accordion without JavaScript
Pure CSS collapsible (with on click) containers/elements/whateva. HTML Code: Tab 1 Tab 2 Tab 3 ELEMENT 1 ELEMENT 2 ELEMENT 3 CSS Code: h1 {display: none; } a.par:focus {color: red} a.par.cac1:focus ~ h1.zzz1 { display: block; color: blue } a.par.cac2:focus ~ h1.zzz2 { display: block; color: blue } a.par.cac3:focus ~ h1.zzz3 { display: block; color: […]
Front End Developer arsenal – SASS. Installation and short manual
Have you ever been dreaming about variables in CSS code? Or maybe other functionalities like functions? The simplest way to have a variables in CSS is to work with preprocessor like SASS. Ruby Firstly you need to know if you have Rudy on your machine. Type in your terminal: ruby -v If execution of this […]
Autoexecuted object in JS
Sometimes you will need to create autoexecuted object (for example in case of load/document ready events). Have you tried to do it this way? Autoexecuted object So what will you do if you want to have external API to your “autoexecuted object”? You can do it this way: Currently we are creating variable to which […]