arshad's public fiddles
-
Creating our own Constructor functions
String() and Object() constructor functions are given to us by the JavaScript programming language. We can create our own custom constructor functions to create objects of a special type. For example, we can create a Person() constructor function to create multiple Person() objects. We can create a BankAccount() constructor function to create multiple BankAccount() objects and so on.
-
Understanding Constructor functions
What are constructor functions? Constructor functions are a way to create multiple objects of a certain kind. For example, given a Person() constructor function, we can create multiple Person() objects. With the String() constructor function, we can create multiple String() objects. With the Array() constructor function, we can create multiple Array() objects. Each object created with the constructor function takes the same default properties and behavior. A constructor function is a template. It specifies default properties and behavior. In other object oriented programming languages such as C# or Java, we have the concept of a class. A class is a construct in these programming languages to define new types and create multiple objects of a type. In JavaScript, we have some native constructor functions that are provided by the language to us. We can also create our own custom constructor functions. This allows to represent a concept such as a BankAccount or model a real world entity such as a Customer in our programs. We create a constructor function and use this template to create multiple objects of the kind.
-
JavaScript constructor functions create and return object instances
A constructor function is a function. It is created using the function() keyword. It is special though, because we don't invoke constructor functions usually such as Person(). We create new instances out of them. They then "return" a newly created object. Also properties are created using the "this" keyword. When used with the new operator, the function takes on a special role and creates objects. "this", the object that is created is returned instead of undefined
-
Next, Prev Items of an array
No-Library (pure JS), HTML, CSS, JavaScript
-
Cody Lindley : JavaScript Enlightenment
Chapter 1 Examples from the book.
-
Cody Lindley - JavaScript Enlightenment
Chapter 1 : Native Constructors
-
Creating empty objects
Objects can be constructed in many ways!
-
Function prototype valueof
No-Library (pure JS), HTML, CSS, JavaScript
-
Javascript - Calling functions without paranthesis
No-Library (pure JS), HTML, CSS, JavaScript
-
JavaScript constructor functions create and return object instances
A constructor function is a function. It is created using the function() keyword. It is special though, because we don't invoke constructor functions usually such as Person(). We create new instances out of them. They then "return" a newly created object. Also properties are created using the "this" keyword. When used with the new operator, the function takes on a special role and creates objects. "this", the object that is created is returned instead of undefined
-
Loading on scroll
Dynamically load content when scroll to the bottom of the document.
-
Fast DOM Operation
jQuery (edge), HTML, CSS, JavaScript
-
Dynamically Create Object
jQuery (edge), HTML, CSS, JavaScript
-
Shifty-eyed Wookie
Chewbacca
-
click div then show scroll content
jQuery 1.12.4, HTML, CSS, JavaScript
-
css icon
No-Library (pure JS), HTML, CSS, JavaScript
-
javascript links
javascript links
-
Polaroid fun - CSS3 Filter Effects Demo
No-Library (pure JS), HTML, CSS, JavaScript
-
HTML5 oninput event
An example of using oninput for better UX. Compared with onchange, or onkeyup, which doesn't fire when you use the ud/down arrow to change the values.
-
input event with input[type="range"]
testing to see if using input event works better than change