Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts
What is Unobtrusive JavaScript ?

Unobtrusive is best practice of writing the JavaScript or JQuery in the decouple or separation format means -

When we write the JavaScript or JQuery - we usually followed the practice of writing the Presentation and behavior in one line only - which is not best practice e.g.




Unobtrusive means decouple or separation of presentation and behavior of object which help in cleaning and maintaining  the code and move out the entire behavior section in separate JS file. e.g.


What is JavaScript , JQuery and DOM ?

In very Short and Simplified manner:-

JavaScript is Language.

JQuery is Library or Framework or Reusable which is built on top of JavaScript.

Basically JQuery works with 3-S i.e. Start ($), Selector (“.” or “#”) and Shot (Action i.e. Click or Val etc.)


 DOM  (Document Object Model ) - It is representation of HTML document  or piece of Web Page or HTML Content exist in the Web page having tags like <Div>, <P>, <Span>, <UI>, <LI> etc..
DOM is like standard object which consist HTML elements properties, HTML elements methods, HTML elements events
DOM - In-Memory representation of HTML
High Level structure of DOM: