Basic jQuery Attribute filters

Now we will discuss about attribute filters of jQuery. By using attribute filter we can select element by it attribute and the attribute value. Common attribute filters are- $(“[attribute]”) Select all elements those has specified attribute. Example: $(“[class]”).css(“border”,”3px solid red”); Select all the elements from HTML document those contains the class attribute. $(“element[attribute]”) Select all… Read More »

Why we will use Object Oriented Programming

Before OOP programmer were used Procedural programming where code were written in linear fashion i.e. from top to bottom. So when program became larger then programmer faced huge problem to manage and debug the code. So to get rid from such problem taken an attempt and introduced function- break down code into manageable segments. It… Read More »

jQuery filters basic

We already seen that jQuery selectors are very powerful for selecting contents from webpages. Now we will use filters that makes jQuery selectors more powerful. jQuery filters works with selectors and provide more powerful fine-grained control on selecting the elements from HTML document. In jQuery filters are categorized into six(06) different categories. They are- 1.… Read More »

JQuery Selectors

jQuery selectors allows us to select and manipulate HTML elements by their name or id or attributes or type or values. In jQuery all selectors are start with $(). Most common jQuery selectors are- 1. Element Selector 2. Id Selector 3. Class Selector 4. Self-Selector 5. All Elements Selector 6. Attribute Selector 7. Hierarchical Selector… Read More »

Create a Simple jQuery enabled page

Now we will create our simple jQuery enabled page. For our first jQuery example we’re going to keep things simple. What we will do is- Include a reference of jQuery library Then we will write an event handler. It will respond to the page loading in the browser window i.e. our event handler will fire… Read More »

Arrays in JavaScript

Sometimes in our application we need to deal with a list of objects. For instance we might to store a list of products in a shopping cart or the list of colors the use has selected. In such situation we use an array to store that list. Let’s see how we do that- Declare a… Read More »

Object in JavaScript

We have already seen all the primitive types in JavaScript. Now let’s take a look at the reference types. In reference types category we have Object Array Function Now we will discuss about Object. Later we will discuss about Array and function. What is an object? An object in JavaScript and any other programming languages… Read More »

Dynamic Type

JavaScript is a Dynamic programming language. What it mean by dynamic language? We have two type of programming language- Static aka Statically typed language Dynamic aka dynamically typed language Static typed language In static typed language we set the variable type during declaration of the variable and it can’t be changed further. Example: In C#… Read More »

jQuery Syntax

We select (by query) HTML elements and perform actions on those elements by using jQuery. The basic syntax of selecting HTML elements and performing action on those elements are $(selector).action() Here $ Sign $ is the jQuery object. Instead $ we can also use jQuery. It actually define jQuery or we can say that $… Read More »

Objects in TypeScript

We already created our class. But there is a problem. We can’t directly use any class. For example we have a class called Point as follows- class Point{ x:number; y:number; draw(){ //————– } getDistance(another:Point){ //————– } } Here we have two variables x and y and two methods draw() and getDistance(). If we want to… Read More »