DOM Manipulation-Most important topic of javascript(Short Description for beginner)

Hey Folks, Hope you doing good, so today we'll gone learn about most important aspect of java script, The DOM Manipulation, as you also google and read the full form and definition of DOM so here we'll get to know why we called this as a DOM Manipulation.

So DOM is data object model which contain HTML of your website.(ANSWER OF WHAT)

(WHY?)-Add on performance and functionality to you're code/project/website...

(NEED?)- To make our website/project more smarter and user interactive.

WHAT ACTUALLY IS HAPPENING IN DOM

DOM changes the event of our HTML code, and event may be a scrolling event,  dataloaded event, mousemove event, volumechange event, click event and so on.

AND THE ABOVE EVENTS are map by function.

(HOW YOU CAN CALL DOM): By Id, class, tag, CSS

REAL WORLD EXAMPLE: Their is a nav bar and has some tags there so when is hover the mouse over their color of that tag should change, or if i have logo of my my project and if i click there short hand description should drop down with information. THESE EXAMPLE AND MANY MORE LIKE THIS IDEA CAN BE EXECUTED WITH DOM MANIPULATION

SYNTAX: 

document.method(function);

SYNATX EXAMPLE

var z = document.querySelector(".control");

so above example tells that variable z store the data and can be call whenever want , then document tag is use to select the HTML/CSS of code and after dot(.) querySelector method is call to render the CSS of .control class.

*There are number of method in DOM manipulation like  - getElementById

                                                                                              addEventListner

                                                                                              querySelectorAll

                                                                                               getElementsByClassName....etc etc

As per you're usage  you'll get encounter with new new method everyday once you start working on this.

In next blog we'll solve a simple minor project using DOM Manipulation.

So stay tuned .

Comments

Popular posts from this blog

Margin in CSS-Explained

Simple increment program in Javascript with source code(using HTML, CSS, JAVASCRIPT)

Language knowledge for Front end developement(Complete road-map)