SlideShare a Scribd company logo
Module Insertion
Insertion  Insertion  provides a cross-browser solution to the dynamic insertion of HTML snippets (or plain text, obviously):  Comes in four flavors:  After, Before, Bottom and Top , which behave just as expected
Insertion-After new Insertion.After(element, html) Inserts the html into the page as the next sibling of element Example; Original HTML <div><p id=&quot;animal_vegetable_mineral&quot;>In short, in all things vegetable, animal, and mineral...</p></div>   Javascript new  Insertion.After( 'animal_vegetable_mineral' ,  &quot;<p>I am the very model of a modern major general.</p>&quot; ); //  Resulting HTML <div>    <p id=&quot;animal_vegetable_mineral&quot;>In short, in all things vegetable, animal, and mineral...</p>   <p>I am the very model of a modern major general.</p> </div>
Insertion-Before new Insertion.Before(element, html)  Inserts the html into the page as the previous sibling of element Example; Original HTML <div> <p id=&quot;modern_major_general&quot;>I am the very model of a modern major general. </p> </div> Javascript new  Insertion.Before( 'modern_major_general' ,  &quot;<p>In short, in all things vegetable, animal, and mineral...</p>&quot; ); Resulting HTML <div><p>In short, in all things vegetable, animal, and mineral...</p> <p id=&quot;modern_major_general&quot;>I am the very model of a modern major general.</p></div>
Insertion-Bottom new Insertion.Bottom(element, html) Inserts the html into the page as the last child of element. Example ; Original HTML <div id=&quot;modern_major_general&quot;> <p>In short, in all things vegetable, animal, and mineral...</p> </div> JavaScript new  Insertion.Bottom( 'modern_major_general' ,  &quot;<p>I am the very model of a modern major  general.</p>&quot; ); Resulting HTML <div id=&quot;modern_major_general&quot;>      <p>In short, in all things vegetable, animal, and mineral...</p>   <p>I am the very model of a modern major general.</p> </div>  
Insertion-Top new Insertion.Top(element, html) Inserts the html into the page as the first child of element Example; Original HTML <div id=&quot;modern_major_general&quot;>   <p>In short, in all things vegetable, animal, and mineral...</p> </div> JavaScript new  Insertion.Top( 'modern_major_general' ,  &quot;<p>I am the very model of a modern major general.</p>&quot; ); Resulting HTML <div id=&quot;modern_major_general&quot;> <p>I am the very model of a modern major general.</p>   <p>In short, in all things vegetable, animal, and mineral...</p> </div>

More Related Content

PDF
The Other Side of HTML
PPT
Html in a box
PPT
YL Intro html
PPTX
3. elements
DOCX
Lesson plan: HTML Formatting Texts and Paragraphs
PPT
Html
PDF
Html - Tutorial
The Other Side of HTML
Html in a box
YL Intro html
3. elements
Lesson plan: HTML Formatting Texts and Paragraphs
Html
Html - Tutorial

What's hot (20)

PPT
Learning HTML
PDF
Intro to HTML (Kid's Class at TIY)
PPT
Web design
PPTX
YL basic tag
PPTX
Headings
PPT
XHTML basics
PDF
Html For Bloggers
PPT
Intro Html
PPT
Html Ppt
PPTX
New HTML5/CSS3 techniques
PPT
2. html attributes
PPT
Basic html
PPT
Css Basics
PPTX
Html review with notes
PPT
Lesson1 Intro to HTML
PPTX
Introduction to basic HTML [Librarian edition]
PPT
Html ppt by Fathima faculty Hasanath college for women bangalore
PPT
Eye catching HTML BASICS tips: Learn easily
PPTX
Xml and JavaScript
PPTX
HTML 5 Web Design
Learning HTML
Intro to HTML (Kid's Class at TIY)
Web design
YL basic tag
Headings
XHTML basics
Html For Bloggers
Intro Html
Html Ppt
New HTML5/CSS3 techniques
2. html attributes
Basic html
Css Basics
Html review with notes
Lesson1 Intro to HTML
Introduction to basic HTML [Librarian edition]
Html ppt by Fathima faculty Hasanath college for women bangalore
Eye catching HTML BASICS tips: Learn easily
Xml and JavaScript
HTML 5 Web Design
Ad

Viewers also liked (9)

PPT
Prototype
PPT
Event
PPT
PPT
Javascript Oop
PPT
Position
PPT
PPT
Php Calling Operators
PPT
Php Rss
PPT
Prototype js
Prototype
Event
Javascript Oop
Position
Php Calling Operators
Php Rss
Prototype js
Ad

Similar to Insertion (20)

PPT
Developing Gadgets
PPT
ODP
Open Power Template 2 presentation
PPT
PHP Tutorials
PPT
PHP Tutorials
PPTX
HTML5
ODP
The (X)HTML Document
PPT
PHP Presentation
PPT
Html
PPT
Introduction To Lamp
PPT
Java Script
PPTX
Creating a Webpage
PPT
PPT
Web development
PPS
Flash Templates- Joomla!Days NL 2009 #jd09nl
PPS
Flash templates for Joomla!
PPTX
Web design 2 - Basic HTML 2010
PPT
Web designing using html
PPT
Developing Gadgets
Open Power Template 2 presentation
PHP Tutorials
PHP Tutorials
HTML5
The (X)HTML Document
PHP Presentation
Html
Introduction To Lamp
Java Script
Creating a Webpage
Web development
Flash Templates- Joomla!Days NL 2009 #jd09nl
Flash templates for Joomla!
Web design 2 - Basic HTML 2010
Web designing using html

More from mussawir20 (20)

PPT
Php Operators N Controllers
PPT
Database Design Process
PPT
Php Simple Xml
PPT
Php String And Regular Expressions
PPT
Php Sq Lite
PPT
Php Sessoins N Cookies
PPT
Php Reusing Code And Writing Functions
PPT
Php Oop
PPT
Php My Sql
PPT
Php File Operations
PPT
Php Error Handling
PPT
Php Crash Course
PPT
Php Basic Security
PPT
Php Using Arrays
PPT
PPT
Javascript
PPT
Object Range
PPT
Prototype Utility Methods(1)
PPT
PPT
Template
Php Operators N Controllers
Database Design Process
Php Simple Xml
Php String And Regular Expressions
Php Sq Lite
Php Sessoins N Cookies
Php Reusing Code And Writing Functions
Php Oop
Php My Sql
Php File Operations
Php Error Handling
Php Crash Course
Php Basic Security
Php Using Arrays
Javascript
Object Range
Prototype Utility Methods(1)
Template

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
MYSQL Presentation for SQL database connectivity
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Mobile App Security Testing_ A Comprehensive Guide.pdf
Unlocking AI with Model Context Protocol (MCP)
sap open course for s4hana steps from ECC to s4
Digital-Transformation-Roadmap-for-Companies.pptx
Spectral efficient network and resource selection model in 5G networks
Programs and apps: productivity, graphics, security and other tools
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MIND Revenue Release Quarter 2 2025 Press Release
MYSQL Presentation for SQL database connectivity
“AI and Expert System Decision Support & Business Intelligence Systems”
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.

Insertion

  • 2. Insertion Insertion provides a cross-browser solution to the dynamic insertion of HTML snippets (or plain text, obviously): Comes in four flavors: After, Before, Bottom and Top , which behave just as expected
  • 3. Insertion-After new Insertion.After(element, html) Inserts the html into the page as the next sibling of element Example; Original HTML <div><p id=&quot;animal_vegetable_mineral&quot;>In short, in all things vegetable, animal, and mineral...</p></div>   Javascript new  Insertion.After( 'animal_vegetable_mineral' ,  &quot;<p>I am the very model of a modern major general.</p>&quot; ); // Resulting HTML <div>    <p id=&quot;animal_vegetable_mineral&quot;>In short, in all things vegetable, animal, and mineral...</p>   <p>I am the very model of a modern major general.</p> </div>
  • 4. Insertion-Before new Insertion.Before(element, html)  Inserts the html into the page as the previous sibling of element Example; Original HTML <div> <p id=&quot;modern_major_general&quot;>I am the very model of a modern major general. </p> </div> Javascript new  Insertion.Before( 'modern_major_general' ,  &quot;<p>In short, in all things vegetable, animal, and mineral...</p>&quot; ); Resulting HTML <div><p>In short, in all things vegetable, animal, and mineral...</p> <p id=&quot;modern_major_general&quot;>I am the very model of a modern major general.</p></div>
  • 5. Insertion-Bottom new Insertion.Bottom(element, html) Inserts the html into the page as the last child of element. Example ; Original HTML <div id=&quot;modern_major_general&quot;> <p>In short, in all things vegetable, animal, and mineral...</p> </div> JavaScript new  Insertion.Bottom( 'modern_major_general' ,  &quot;<p>I am the very model of a modern major  general.</p>&quot; ); Resulting HTML <div id=&quot;modern_major_general&quot;>      <p>In short, in all things vegetable, animal, and mineral...</p>   <p>I am the very model of a modern major general.</p> </div>  
  • 6. Insertion-Top new Insertion.Top(element, html) Inserts the html into the page as the first child of element Example; Original HTML <div id=&quot;modern_major_general&quot;>   <p>In short, in all things vegetable, animal, and mineral...</p> </div> JavaScript new  Insertion.Top( 'modern_major_general' ,  &quot;<p>I am the very model of a modern major general.</p>&quot; ); Resulting HTML <div id=&quot;modern_major_general&quot;> <p>I am the very model of a modern major general.</p>   <p>In short, in all things vegetable, animal, and mineral...</p> </div>