jQuery makes it easy to search through and modify elements in the HTML document object model (DOM) using CSS selector syntax. It provides methods to find elements by tag name, id, class, and other attributes. Elements can be modified by changing their text, attributes, CSS classes, and more. jQuery also helps traverse the DOM tree by finding parent, child, sibling, and other related elements to the initially selected ones.
This document provides an overview of how to script the DOM using JavaScript. It discusses how the browser parses HTML into a DOM tree, with the window and document objects being the root nodes. It then explains how to access and manipulate DOM elements using the body, JavaScript functions, and events. Finally, it covers creating custom objects and namespacing in JavaScript.
jQuery is a JavaScript library that simplifies HTML document traversal, event handling, animating, and Ajax interactions. It is lightweight, cross-browser compatible, and used on over 41% of popular websites. This document provides an introduction and overview of jQuery selectors, DOM manipulation, events, effects, and Ajax capabilities in 3 sentences or less per topic.
The document provides an overview of jQuery including:
- What jQuery is and its main features like DOM manipulation and AJAX
- How to include jQuery in an HTML document and basic usage syntax
- jQuery selectors to find elements and filters to refine selections
- Common jQuery methods for manipulating attributes, events, HTML, CSS, and more
- Examples of using various jQuery functions and concepts
The document discusses the history and evolution of CSS (Cascading Style Sheets). It explains that CSS1 was introduced in 1996 and offered basic formatting capabilities. CSS2 was released in 1998 and introduced additional features like positioning. CSS3 has been divided into modules since work began on it in 1999, with each module adding new capabilities or extending CSS2 features while maintaining backward compatibility. The document then discusses some important CSS3 modules and the browser support for CSS3.
This document provides an introduction to jQuery, covering JavaScript basics, what jQuery is, DOM manipulation with jQuery, events, animations, and additional resources. It aims to familiarize the reader with the JavaScript library jQuery and get them started with client-side scripting using the most common jQuery features and techniques. The document contains examples throughout to demonstrate jQuery concepts like selecting elements, modifying the DOM, handling events, and animations.
JavaScript can dynamically manipulate the content, structure, and styling of an HTML document through the Document Object Model (DOM). The DOM represents an HTML document as nodes that can be accessed and modified with JavaScript. Common tasks include dynamically creating and adding elements, handling user events like clicks, and updating content by accessing DOM elements by their id or other attributes.
JavaScript is a scripting language that adds interactivity to HTML pages. It works in all major browsers and is used to build dynamic web pages. JavaScript can react to events, modify HTML elements, validate forms, detect browsers, and write cookies. It is commonly placed in <script> tags within HTML pages or linked via external .js files. Comments are added to explain JavaScript code and prevent execution.
This document provides an overview of how to script the DOM using JavaScript. It discusses how the browser parses HTML into a DOM tree, with the window and document objects being the root nodes. It then explains how to access and manipulate DOM elements using the body, JavaScript functions, and events. Finally, it covers creating custom objects and namespacing in JavaScript.
jQuery is a JavaScript library that simplifies HTML document traversal, event handling, animating, and Ajax interactions. It is lightweight, cross-browser compatible, and used on over 41% of popular websites. This document provides an introduction and overview of jQuery selectors, DOM manipulation, events, effects, and Ajax capabilities in 3 sentences or less per topic.
The document provides an overview of jQuery including:
- What jQuery is and its main features like DOM manipulation and AJAX
- How to include jQuery in an HTML document and basic usage syntax
- jQuery selectors to find elements and filters to refine selections
- Common jQuery methods for manipulating attributes, events, HTML, CSS, and more
- Examples of using various jQuery functions and concepts
The document discusses the history and evolution of CSS (Cascading Style Sheets). It explains that CSS1 was introduced in 1996 and offered basic formatting capabilities. CSS2 was released in 1998 and introduced additional features like positioning. CSS3 has been divided into modules since work began on it in 1999, with each module adding new capabilities or extending CSS2 features while maintaining backward compatibility. The document then discusses some important CSS3 modules and the browser support for CSS3.
This document provides an introduction to jQuery, covering JavaScript basics, what jQuery is, DOM manipulation with jQuery, events, animations, and additional resources. It aims to familiarize the reader with the JavaScript library jQuery and get them started with client-side scripting using the most common jQuery features and techniques. The document contains examples throughout to demonstrate jQuery concepts like selecting elements, modifying the DOM, handling events, and animations.
JavaScript can dynamically manipulate the content, structure, and styling of an HTML document through the Document Object Model (DOM). The DOM represents an HTML document as nodes that can be accessed and modified with JavaScript. Common tasks include dynamically creating and adding elements, handling user events like clicks, and updating content by accessing DOM elements by their id or other attributes.
JavaScript is a scripting language that adds interactivity to HTML pages. It works in all major browsers and is used to build dynamic web pages. JavaScript can react to events, modify HTML elements, validate forms, detect browsers, and write cookies. It is commonly placed in <script> tags within HTML pages or linked via external .js files. Comments are added to explain JavaScript code and prevent execution.
The document provides an overview of JavaScript and the Document Object Model (DOM). It introduces JavaScript as a scripting language used to add interactivity and dynamic behavior to web pages. It describes how JavaScript can be implemented in HTML using <script> tags in the head or body, or externally in .js files. The document then covers JavaScript syntax including data types, operators, conditional statements, loops, functions. It also discusses the DOM and how JavaScript can manipulate HTML elements and attributes.
This document provides an overview of JavaScript including:
- JavaScript is an interpreted programming language that allows adding interactivity to HTML pages.
- It is commonly used for client-side scripting of web pages in browsers.
- Core JavaScript concepts like variables, data types, operators, and functions are introduced.
- Different types of loops in JavaScript like for, for/in, while and do/while loops are explained.
- Best practices for including JavaScript code in HTML files using <script> tags are covered.
This document provides a tutorial on basic jQuery concepts and syntax for beginners. It introduces selecting elements, manipulating CSS classes and styles, adding and removing elements, handling events, showing/hiding elements, and basic animations. The tutorial recommends learners get more in-depth training through books, tutorials and documentation to fully understand jQuery's capabilities.
This document provides an introduction to an Advanced JavaScript course. It covers accessing the browser console, using console.log() to output messages, and demonstrates basic JavaScript code. The key points are:
1. The browser console is used to view output from console.log() and debug JavaScript errors. It is accessed differently in Chrome, Safari, Firefox, and Internet Explorer.
2. Basic JavaScript code is shown using console.log() to output messages based on if/else conditions.
3. The console displays the output messages along with the file and line numbers where they were logged. Clicking a line number highlights it in the code.
4. The console has additional tabs like Sources that can be
The document discusses JavaScript and the DOM (Document Object Model). It provides an overview of the DOM, how it is used to represent XML documents in different languages including JavaScript. It also covers navigating the DOM tree, creating and attaching nodes, handling events, and overriding default browser events.
This document provides an introduction to jQuery, including:
- jQuery is a JavaScript library that simplifies HTML document interaction and event handling. It was created by John Resig in 2006.
- The current version is 1.3.2 and version 1.4 is coming soon. John Resig continues to develop jQuery in Boston.
- jQuery selects elements, changes their properties, handles events, and makes AJAX calls to simplify common JavaScript tasks. It works by selecting DOM elements and running functions on the selection.
This document provides an introduction and overview of jQuery, including:
- What jQuery is and its main features for selecting, manipulating, and traversing HTML elements, handling events, animating content, and making AJAX requests.
- How jQuery works by using the jQuery() function and alias $.
- How jQuery simplifies common JavaScript tasks like selecting elements and handling events using CSS-like selectors and methods.
- Key concepts of the DOM and how jQuery interacts with and modifies the DOM.
The document is a presentation about D3 and SVG technologies. It includes sections on networking opportunities, an interactive presentation format, polls about experience levels with D3 and SVG, examples of force-directed graphs and animated SVGs using D3, and details on implementing drag and drop as well as mouseover highlighting in a D3 visualization. The presentation source code is provided on GitHub and other examples are referenced, including alternatives to SVG. It concludes with another poll and a question and answer period.
This document outlines a presentation on jQuery fundamentals. The presentation introduces jQuery as a lightweight JavaScript library for DOM manipulation, event handling, Ajax, and animation. It covers jQuery syntax, selectors, DOM traversal and manipulation methods. It also discusses jQuery's event system, Ajax support, and plugins. The presentation includes demos of common jQuery tasks to demonstrate its usage and capabilities.
Chrome DevTools Introduction 2020 Web Developers GuideLaurence Svekis ✔
Learn how use Chrome DevTools improve on Debugging, Customize look and feel and learn some shortcuts for Web development
Course covers
Open DevTools
Element Panel
Where to compute and get box model details
using the Console and JavaScript coding
Snippets of code running and saved in the console
Access local filesystem with DevTOols
Network for file load times and debugging
Application tab for session and local storage values
Audit Panel and how to get website improvement report
Shortcuts and getting more help with DevTools
Taught by an instructor with over 20 years of web development experience ready to help you learn about DevTools
JQuery is a JavaScript library that simplifies HTML document manipulation, event handling, animations, and Ajax interactions. It works across browsers and makes tasks like DOM traversal and manipulation, event handling, animation, and Ajax much simpler. JQuery's versatility, extensibility, and cross-browser compatibility have made it popular, with millions of developers using it to write JavaScript.
2016 is going to be the year of Virtual DOM. React.js one of the most popular implementation of Virtual DOM. But this time we won't focus on React.js. We will be focusing on what is the concept of Virtual DOM, what's the benefits, and how to use it without React.js. All of those concepts will help you understand this newest DOM manipulation technique and better work with any Virtual DOM implementations such React.js.
This document provides summaries of key points about the jQuery and Prototype JavaScript libraries:
1. jQuery is an open-source JavaScript library that simplifies HTML document traversal, event handling, animation, and Ajax interactions. It has a lightweight footprint and is cross-browser compatible.
2. Both jQuery and Prototype are available under MIT and GPL licenses, allowing developers to choose the license that best suits their projects. jQuery is maintained by a core team and has additional community support.
3. The document then provides examples of common jQuery functions and selectors for manipulating the DOM, handling events, animating elements, and making Ajax requests.
The document discusses jQuery basics and the DOM. It explains that the DOM is how browsers structure HTML documents into an XML format. jQuery allows selecting elements from the DOM using CSS-style selectors and manipulating them using jQuery functions. Popular uses of jQuery include DOM manipulation, effects, AJAX calls, and building plugins. The document encourages learning more about jQuery through its online documentation.
Explore how you can easily add advanced functionality to your web projects by adding jQuery. JQuery for web development
https://www.udemy.com/web-development-introduction-to-jquery/?couponCode=SLIDESHARE
jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code.
The document provides an overview of JavaScript and the Document Object Model (DOM). It introduces JavaScript as a scripting language used to add interactivity and dynamic behavior to web pages. It describes how JavaScript can be implemented in HTML using <script> tags in the head or body, or externally in .js files. The document then covers JavaScript syntax including data types, operators, conditional statements, loops, functions. It also discusses the DOM and how JavaScript can manipulate HTML elements and attributes.
This document provides an overview of JavaScript including:
- JavaScript is an interpreted programming language that allows adding interactivity to HTML pages.
- It is commonly used for client-side scripting of web pages in browsers.
- Core JavaScript concepts like variables, data types, operators, and functions are introduced.
- Different types of loops in JavaScript like for, for/in, while and do/while loops are explained.
- Best practices for including JavaScript code in HTML files using <script> tags are covered.
This document provides a tutorial on basic jQuery concepts and syntax for beginners. It introduces selecting elements, manipulating CSS classes and styles, adding and removing elements, handling events, showing/hiding elements, and basic animations. The tutorial recommends learners get more in-depth training through books, tutorials and documentation to fully understand jQuery's capabilities.
This document provides an introduction to an Advanced JavaScript course. It covers accessing the browser console, using console.log() to output messages, and demonstrates basic JavaScript code. The key points are:
1. The browser console is used to view output from console.log() and debug JavaScript errors. It is accessed differently in Chrome, Safari, Firefox, and Internet Explorer.
2. Basic JavaScript code is shown using console.log() to output messages based on if/else conditions.
3. The console displays the output messages along with the file and line numbers where they were logged. Clicking a line number highlights it in the code.
4. The console has additional tabs like Sources that can be
The document discusses JavaScript and the DOM (Document Object Model). It provides an overview of the DOM, how it is used to represent XML documents in different languages including JavaScript. It also covers navigating the DOM tree, creating and attaching nodes, handling events, and overriding default browser events.
This document provides an introduction to jQuery, including:
- jQuery is a JavaScript library that simplifies HTML document interaction and event handling. It was created by John Resig in 2006.
- The current version is 1.3.2 and version 1.4 is coming soon. John Resig continues to develop jQuery in Boston.
- jQuery selects elements, changes their properties, handles events, and makes AJAX calls to simplify common JavaScript tasks. It works by selecting DOM elements and running functions on the selection.
This document provides an introduction and overview of jQuery, including:
- What jQuery is and its main features for selecting, manipulating, and traversing HTML elements, handling events, animating content, and making AJAX requests.
- How jQuery works by using the jQuery() function and alias $.
- How jQuery simplifies common JavaScript tasks like selecting elements and handling events using CSS-like selectors and methods.
- Key concepts of the DOM and how jQuery interacts with and modifies the DOM.
The document is a presentation about D3 and SVG technologies. It includes sections on networking opportunities, an interactive presentation format, polls about experience levels with D3 and SVG, examples of force-directed graphs and animated SVGs using D3, and details on implementing drag and drop as well as mouseover highlighting in a D3 visualization. The presentation source code is provided on GitHub and other examples are referenced, including alternatives to SVG. It concludes with another poll and a question and answer period.
This document outlines a presentation on jQuery fundamentals. The presentation introduces jQuery as a lightweight JavaScript library for DOM manipulation, event handling, Ajax, and animation. It covers jQuery syntax, selectors, DOM traversal and manipulation methods. It also discusses jQuery's event system, Ajax support, and plugins. The presentation includes demos of common jQuery tasks to demonstrate its usage and capabilities.
Chrome DevTools Introduction 2020 Web Developers GuideLaurence Svekis ✔
Learn how use Chrome DevTools improve on Debugging, Customize look and feel and learn some shortcuts for Web development
Course covers
Open DevTools
Element Panel
Where to compute and get box model details
using the Console and JavaScript coding
Snippets of code running and saved in the console
Access local filesystem with DevTOols
Network for file load times and debugging
Application tab for session and local storage values
Audit Panel and how to get website improvement report
Shortcuts and getting more help with DevTools
Taught by an instructor with over 20 years of web development experience ready to help you learn about DevTools
JQuery is a JavaScript library that simplifies HTML document manipulation, event handling, animations, and Ajax interactions. It works across browsers and makes tasks like DOM traversal and manipulation, event handling, animation, and Ajax much simpler. JQuery's versatility, extensibility, and cross-browser compatibility have made it popular, with millions of developers using it to write JavaScript.
2016 is going to be the year of Virtual DOM. React.js one of the most popular implementation of Virtual DOM. But this time we won't focus on React.js. We will be focusing on what is the concept of Virtual DOM, what's the benefits, and how to use it without React.js. All of those concepts will help you understand this newest DOM manipulation technique and better work with any Virtual DOM implementations such React.js.
This document provides summaries of key points about the jQuery and Prototype JavaScript libraries:
1. jQuery is an open-source JavaScript library that simplifies HTML document traversal, event handling, animation, and Ajax interactions. It has a lightweight footprint and is cross-browser compatible.
2. Both jQuery and Prototype are available under MIT and GPL licenses, allowing developers to choose the license that best suits their projects. jQuery is maintained by a core team and has additional community support.
3. The document then provides examples of common jQuery functions and selectors for manipulating the DOM, handling events, animating elements, and making Ajax requests.
The document discusses jQuery basics and the DOM. It explains that the DOM is how browsers structure HTML documents into an XML format. jQuery allows selecting elements from the DOM using CSS-style selectors and manipulating them using jQuery functions. Popular uses of jQuery include DOM manipulation, effects, AJAX calls, and building plugins. The document encourages learning more about jQuery through its online documentation.
Explore how you can easily add advanced functionality to your web projects by adding jQuery. JQuery for web development
https://www.udemy.com/web-development-introduction-to-jquery/?couponCode=SLIDESHARE
jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code.
The document provides an overview of jQuery, a popular JavaScript library, including its history and benefits such as easy DOM manipulation, AJAX capabilities, and cross-browser compatibility. It then demonstrates several jQuery functions and selectors for modifying HTML elements, handling events, and making AJAX requests to update content without page refreshes. Examples are given for selecting elements, updating styles, handling events like clicks, and validating form input with plugins.
This document provides an introduction and overview of jQuery. It discusses how jQuery simplifies DOM navigation and manipulation, handles browser differences, and makes JavaScript coding easier. The document covers basic jQuery concepts like selectors, the jQuery function, attributes, and events. It also provides examples of common jQuery code.
This document provides an introduction to JavaScript and the Document Object Model (DOM). It discusses how JavaScript can be used to dynamically manipulate HTML pages by accessing and modifying the DOM. The DOM represents an HTML or XML document as a tree structure consisting of nodes, and JavaScript can select nodes and modify their content, attributes, and styling. The document also explains how to create a DOM representation of an XML document using JavaScript and the XMLHttpRequest object.
Introduction to Javascript programmingFulvio Corno
The document provides an introduction to client-side programming using JavaScript. It discusses how JavaScript can be used to add interactivity to web pages by manipulating the HTML document object model directly in the browser. It covers the basics of the JavaScript language including variables, data types, operators, and control structures. It also introduces common JavaScript objects like Date, String, Array, and Math that are used to work with dates, strings, arrays of values and mathematical functions respectively. The document provides examples of how to define and call functions in JavaScript.
jQuery is a JavaScript framework that provides useful functionality for common programming tasks related to the client-side manipulation of web pages. It simplifies tasks like DOM manipulation, event handling, animation, and Ajax interactions. While powerful, jQuery is not a substitute for JavaScript and does not solve every problem - it works best when used to enhance JavaScript where it makes tasks easier. jQuery selects elements, applies functions to matched elements, and returns jQuery objects to allow chaining of methods.
JavaScript is one of the 3 languages all web developers must learn:
1. HTML to define the content of web pages
2. CSS to specify the layout of web pages
3. JavaScript to program the behavior of web pages
Downloading jQuery file from jQuery website.
Referring to jQuery file through Content Delivery Networks.
Google CDN
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js>
</script>
Microsoft CDN
<script src=“http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.0.min.js”>
</script>
jQuery is a JavaScript library that simplifies HTML document traversal, event handling, animating, and Ajax interactions. It was created in 2006 with the goal of writing less code to do more. jQuery simplifies tasks like selecting elements, handling events, performing animations and AJAX calls to make web development faster.
jQuery is a JavaScript library which allows you to develop solutions with less code, in less time. You can build interactive prototypes for your prospective clients, or take an existing solution and add new dynamic behaviour with little effort.
We will see how jQuery can be used to quickly and concisely apply JavaScript behaviour to your web app. It will cover selectors, Ajax, DOM manipulation and more. The aim: to produce lean unobtrusive JavaScript with jQuery.
The document provides an introduction to jQuery, explaining what it is, its benefits over traditional JavaScript, and how it can be used. Key points covered include:
- jQuery is a lightweight JavaScript library that makes client-side scripting easier by providing cross-browser compatibility and methods for selecting, manipulating, and traversing DOM elements.
- jQuery solves many cross-browser issues that exist with traditional JavaScript and allows unobtrusive JavaScript that separates behavior from content.
- jQuery simplifies many common tasks like DOM traversal and manipulation through methods like $.(), selectors, events, effects, and plugins. This allows easier and more readable code compared to traditional JavaScript.
- The document provides examples of how to use
jQuery is the new favorite of web developers. This lightweight JavaScript library makes developers love writing JavaScript code again! What needed 20 lines of code first is now reduced to 3 lines. Who wouldn’t be enthusiastic?! Microsoft showed its love for the library by fully integrating it in Visual Studio. I dare to ask: Should you stay behind? In this session, we’ll take a look at jQuery and we’ll teach you what you need to know to get on your way. More specifically, we’ll look at selectors, attributes, working with WCF, jQuery UI and much more. You may walk out of this session wearing a sticker: “I love jQuery”!
The document discusses jQuery and Ajax. It explains that jQuery is a JavaScript library that simplifies JavaScript programming and DOM manipulation. It allows selecting HTML elements and performing actions on them with simple syntax like $(selector).action(). Some key points made are:
- jQuery takes common tasks like AJAX calls and wraps them in simple methods.
- Popular features include HTML/CSS manipulation, events, effects/animations, and utilities.
- Major companies like Google use jQuery.
- jQuery works cross-browser and is easy to include via a script tag.
The document provides an overview of jQuery, including what it is, its syntax, basic usage, selectors, filters, events, and effects. jQuery is a powerful JavaScript library that simplifies common JavaScript tasks like selecting elements, modifying CSS, handling events, and animations. It provides cross-browser compatibility and AJAX support. jQuery selectors and methods allow selecting and manipulating page elements via CSS-like syntax.
This document provides an overview of jQuery syntax and structure:
- jQuery code follows a consistent structure of selecting an element, defining an event, and performing an action. This makes jQuery easier to learn than JavaScript.
- An example of jQuery code is provided to trigger an alert when a link is clicked, and it is translated line-by-line into plain English.
- The benefits of jQuery over JavaScript are fewer mistakes, less code, and faster learning due to its simple and intuitive structure.
Learning jQuery made exciting in an interactive session by one of our team me...Thinqloud
- jQuery is a JavaScript library that simplifies HTML document traversal and manipulation, event handling, animation, and Ajax interactions for rapid web development. It works across all major browsers.
- jQuery UI provides interactive widgets, effects, and themes that can be used to build highly interactive web applications. It is built on top of the jQuery library and uses JavaScript, CSS, and HTML. Popular widgets include accordion, autocomplete, datepicker, dialog, and slider.
- To use jQuery UI, developers include the jQuery-ui.js and jquery-ui.css files in their web pages. It offers interactions, widgets, effects, themes and utilities that enhance the user experience of applications.
- jQuery is a JavaScript library that simplifies JavaScript programming and makes it easier to use JavaScript on websites.
- To add jQuery, include the jQuery script in the <head> section of an HTML page by linking to the jQuery CDN or downloading the jQuery file.
- jQuery syntax uses the $ sign followed by a selector and an action. For example, $("p").hide() hides all <p> elements.
- Common jQuery methods include hide(), show(), fadeIn(), fadeOut(), and slideUp() to manipulate HTML elements with simple function calls.
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...indexPub
The recent surge in pro-Palestine student activism has prompted significant responses from universities, ranging from negotiations and divestment commitments to increased transparency about investments in companies supporting the war on Gaza. This activism has led to the cessation of student encampments but also highlighted the substantial sacrifices made by students, including academic disruptions and personal risks. The primary drivers of these protests are poor university administration, lack of transparency, and inadequate communication between officials and students. This study examines the profound emotional, psychological, and professional impacts on students engaged in pro-Palestine protests, focusing on Generation Z's (Gen-Z) activism dynamics. This paper explores the significant sacrifices made by these students and even the professors supporting the pro-Palestine movement, with a focus on recent global movements. Through an in-depth analysis of printed and electronic media, the study examines the impacts of these sacrifices on the academic and personal lives of those involved. The paper highlights examples from various universities, demonstrating student activism's long-term and short-term effects, including disciplinary actions, social backlash, and career implications. The researchers also explore the broader implications of student sacrifices. The findings reveal that these sacrifices are driven by a profound commitment to justice and human rights, and are influenced by the increasing availability of information, peer interactions, and personal convictions. The study also discusses the broader implications of this activism, comparing it to historical precedents and assessing its potential to influence policy and public opinion. The emotional and psychological toll on student activists is significant, but their sense of purpose and community support mitigates some of these challenges. However, the researchers call for acknowledging the broader Impact of these sacrifices on the future global movement of FreePalestine.
Temple of Asclepius in Thrace. Excavation resultsKrassimira Luka
The temple and the sanctuary around were dedicated to Asklepios Zmidrenus. This name has been known since 1875 when an inscription dedicated to him was discovered in Rome. The inscription is dated in 227 AD and was left by soldiers originating from the city of Philippopolis (modern Plovdiv).
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.pptHenry Hollis
The History of NZ 1870-1900.
Making of a Nation.
From the NZ Wars to Liberals,
Richard Seddon, George Grey,
Social Laboratory, New Zealand,
Confiscations, Kotahitanga, Kingitanga, Parliament, Suffrage, Repudiation, Economic Change, Agriculture, Gold Mining, Timber, Flax, Sheep, Dairying,
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumMJDuyan
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 𝟏)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
𝐃𝐢𝐬𝐜𝐮𝐬𝐬 𝐭𝐡𝐞 𝐄𝐏𝐏 𝐂𝐮𝐫𝐫𝐢𝐜𝐮𝐥𝐮𝐦 𝐢𝐧 𝐭𝐡𝐞 𝐏𝐡𝐢𝐥𝐢𝐩𝐩𝐢𝐧𝐞𝐬:
- Understand the goals and objectives of the Edukasyong Pantahanan at Pangkabuhayan (EPP) curriculum, recognizing its importance in fostering practical life skills and values among students. Students will also be able to identify the key components and subjects covered, such as agriculture, home economics, industrial arts, and information and communication technology.
𝐄𝐱𝐩𝐥𝐚𝐢𝐧 𝐭𝐡𝐞 𝐍𝐚𝐭𝐮𝐫𝐞 𝐚𝐧𝐝 𝐒𝐜𝐨𝐩𝐞 𝐨𝐟 𝐚𝐧 𝐄𝐧𝐭𝐫𝐞𝐩𝐫𝐞𝐧𝐞𝐮𝐫:
-Define entrepreneurship, distinguishing it from general business activities by emphasizing its focus on innovation, risk-taking, and value creation. Students will describe the characteristics and traits of successful entrepreneurs, including their roles and responsibilities, and discuss the broader economic and social impacts of entrepreneurial activities on both local and global scales.
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
A Visual Guide to 1 Samuel | A Tale of Two HeartsSteve Thomason
These slides walk through the story of 1 Samuel. Samuel is the last judge of Israel. The people reject God and want a king. Saul is anointed as the first king, but he is not a good king. David, the shepherd boy is anointed and Saul is envious of him. David shows honor while Saul continues to self destruct.
This presentation was provided by Rebecca Benner, Ph.D., of the American Society of Anesthesiologists, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
Chapter wise All Notes of First year Basic Civil Engineering.pptxDenish Jangid
Chapter wise All Notes of First year Basic Civil Engineering
Syllabus
Chapter-1
Introduction to objective, scope and outcome the subject
Chapter 2
Introduction: Scope and Specialization of Civil Engineering, Role of civil Engineer in Society, Impact of infrastructural development on economy of country.
Chapter 3
Surveying: Object Principles & Types of Surveying; Site Plans, Plans & Maps; Scales & Unit of different Measurements.
Linear Measurements: Instruments used. Linear Measurement by Tape, Ranging out Survey Lines and overcoming Obstructions; Measurements on sloping ground; Tape corrections, conventional symbols. Angular Measurements: Instruments used; Introduction to Compass Surveying, Bearings and Longitude & Latitude of a Line, Introduction to total station.
Levelling: Instrument used Object of levelling, Methods of levelling in brief, and Contour maps.
Chapter 4
Buildings: Selection of site for Buildings, Layout of Building Plan, Types of buildings, Plinth area, carpet area, floor space index, Introduction to building byelaws, concept of sun light & ventilation. Components of Buildings & their functions, Basic concept of R.C.C., Introduction to types of foundation
Chapter 5
Transportation: Introduction to Transportation Engineering; Traffic and Road Safety: Types and Characteristics of Various Modes of Transportation; Various Road Traffic Signs, Causes of Accidents and Road Safety Measures.
Chapter 6
Environmental Engineering: Environmental Pollution, Environmental Acts and Regulations, Functional Concepts of Ecology, Basics of Species, Biodiversity, Ecosystem, Hydrological Cycle; Chemical Cycles: Carbon, Nitrogen & Phosphorus; Energy Flow in Ecosystems.
Water Pollution: Water Quality standards, Introduction to Treatment & Disposal of Waste Water. Reuse and Saving of Water, Rain Water Harvesting. Solid Waste Management: Classification of Solid Waste, Collection, Transportation and Disposal of Solid. Recycling of Solid Waste: Energy Recovery, Sanitary Landfill, On-Site Sanitation. Air & Noise Pollution: Primary and Secondary air pollutants, Harmful effects of Air Pollution, Control of Air Pollution. . Noise Pollution Harmful Effects of noise pollution, control of noise pollution, Global warming & Climate Change, Ozone depletion, Greenhouse effect
Text Books:
1. Palancharmy, Basic Civil Engineering, McGraw Hill publishers.
2. Satheesh Gopi, Basic Civil Engineering, Pearson Publishers.
3. Ketki Rangwala Dalal, Essentials of Civil Engineering, Charotar Publishing House.
4. BCP, Surveying volume 1
🔥🔥🔥🔥🔥🔥🔥🔥🔥
إضغ بين إيديكم من أقوى الملازم التي صممتها
ملزمة تشريح الجهاز الهيكلي (نظري 3)
💀💀💀💀💀💀💀💀💀💀
تتميز هذهِ الملزمة بعِدة مُميزات :
1- مُترجمة ترجمة تُناسب جميع المستويات
2- تحتوي على 78 رسم توضيحي لكل كلمة موجودة بالملزمة (لكل كلمة !!!!)
#فهم_ماكو_درخ
3- دقة الكتابة والصور عالية جداً جداً جداً
4- هُنالك بعض المعلومات تم توضيحها بشكل تفصيلي جداً (تُعتبر لدى الطالب أو الطالبة بإنها معلومات مُبهمة ومع ذلك تم توضيح هذهِ المعلومات المُبهمة بشكل تفصيلي جداً
5- الملزمة تشرح نفسها ب نفسها بس تكلك تعال اقراني
6- تحتوي الملزمة في اول سلايد على خارطة تتضمن جميع تفرُعات معلومات الجهاز الهيكلي المذكورة في هذهِ الملزمة
واخيراً هذهِ الملزمة حلالٌ عليكم وإتمنى منكم إن تدعولي بالخير والصحة والعافية فقط
كل التوفيق زملائي وزميلاتي ، زميلكم محمد الذهبي 💊💊
🔥🔥🔥🔥🔥🔥🔥🔥🔥
7. What you can do with jQuery
1.1 What is jQuery?
reveal interface elements
8. What you can do with jQuery
1.1 What is jQuery?
change content based on user actions
9. What you can do with jQuery
1.1 What is jQuery?
toggle CSS classes to highlight an element
10. talk
animate
listen
change
find
jQuery makes it easy to:
1.1 What is jQuery?
elements in an HTML document
HTML content
to what a user does and react accordingly
content on the page
over the network to fetch new content
11. HTML document
Changing content
How can we modify the text
of the <h1> element?
1.1 What is jQuery?
<!DOCTYPE html>
<html>
<head>
<title>jQuery Adventures</title>
</head>
<body>
<h1>Where do you want to go?</h1>
<p>Plan your next adventure.</p>
</body>
</html>
find it
change it
12. HTML document
Finding the proper HTML
How can we search
through our html?
We need to understand how our browser
organizes the HTML it receives.
1.1 What is jQuery?
<!DOCTYPE html>
<html>
<head>
<title>jQuery Adventures</title>
</head>
<body>
<h1>Where do you want to go?</h1>
<p>Plan your next adventure.</p>
</body>
</html>
find it
13. Document Object Model
A tree-like structure created by browsers so we can
quickly find HTML Elements using JavaScript.
1.1 What is jQuery?
“DOM”
14. Loading HTML into the DOM
DOM
browser
1.1 What is jQuery?
HTML document
100%0% 50%
<!DOCTYPE html>
<html>
<head>
<title>jQuery Adventures</title>
</head>
<body>
<h1>Where do you want to go?</h1>
<p>Plan your next adventure.</p>
</body>
</html>
15. html
head
body
title
h1
p
jQuery Adven...
element textnode types:
The DOM
DOCUMENT
Where do...
Plan your...
Inside the DOM, HTML elements become “nodes”
which have relationships with one another.
What does that DOM structure look like?
1.1 What is jQuery?
HTML document
<!DOCTYPE html>
<html>
<head>
<title>jQuery Adventures</title>
</head>
<body>
<h1>Where do you want to go?</h1>
<p>Plan your next adventure.</p>
</body>
</html>
16. html
head
body
title
h1
p
jQuery Adven...
element textnode types:
The DOM
DOCUMENT
Where do...
Plan your...
How do we search through the DOM?
1.1 What is jQuery?
JavaScript
JavaScript gives developers a
language to interact with the DOM.
17. JavaScript
How do we find things using the DOM?
1.1 What is jQuery?
HTML
Web Server
Requests a Webpage
Sends the HTML
HTML
JavaScript
+ other files needed
to load that page
DOM
Loads into
Interacts with
Web Browser
19. DOM
If our JavaScript uses jQuery to interact
with the DOM then it will work on most
modern browsers.
DOM
DOM
DOM
DOM
jQuery to the rescue!
1.1 What is jQuery?
JavaScript
20. Basic jQuery usage
this is the jQuery function
1.1 What is jQuery?
jQuery(<code>);
JavaScript
21. How jQuery Accesses The DOM
1.1 What is jQuery?
jQuery(document);
The DOM
But how can we search through the DOM?
JavaScript
22. h1 { font-size: 3em; }
CSS selectors
p { color: blue; }
1.1 What is jQuery?
<!DOCTYPE html>
<html>
<head>
<title>jQuery Adventures</title>
</head>
<body>
<h1>Where do you want to go?</h1>
<p>Plan your next adventure.</p>
</body>
</html>
HTML document
We need to use CSS selectors
23. Using the jQuery function to find nodes
jQuery("h1");
jQuery("p");
1.1 What is jQuery?
<!DOCTYPE html>
<html>
<head>
<title>jQuery Adventures</title>
</head>
<body>
<h1>Where do you want to go?</h1>
<p>Plan your next adventure.</p>
</body>
</html>
HTML document jQuery selectors
$("h1");
$("p");
= short & sweet
syntax
24. Changing the content of an element
<!DOCTYPE html>
<html>
<head>
<title>jQuery Adventures</title>
</head>
<body>
<h1>Where do you want to go?</h1>
<p>Plan your next adventure.</p>
</body>
</html>
HTML document
1.1 What is jQuery?
How can we modify the text
of the <h1> element?
find it
change it
25. Selecting by HTML element name
html
head
body
title
h1
p
jQuery Adv...
DOM representation of the document
DOCUMENT
Where do...
Plan your...
1.1 What is jQuery?
<!DOCTYPE html>
<html>
<head>
<title>jQuery Adventures</title>
</head>
<body>
<h1>Where do you want to go?</h1>
<p>Plan your next adventure.</p>
</body>
</html>
HTML document
26. Selecting by HTML element name
$("h1")
html
head
body
title
h1h1
p
jQuery Adv...
DOM representation of the document
DOCUMENT
Where do...
Plan your...
1.1 What is jQuery?
;
27. "Where do you want to go"
Fetching an element’s text
1.1 What is jQuery?
html
head
body
title
h1
p
jQuery Adv...
DOM representation of the document
DOCUMENT
Plan your...
Where do...
text() is a method offered by jQuery
($("h1").text );
28. Modifying an element’s text
html
head
body
title
h1
p
jQuery Adv...
DOM representation of the document
DOCUMENT
Where to?
Plan your...
1.1 What is jQuery?
text() also allows to modify the text node
$("h1").text( );"Where to?"
29. DOM
JavaScript may execute before the DOM loads
HTML
1.1 What is jQuery?
100%0% 50%
$("h1").text( );"Where to?"
We need to make sure the DOM has finished loading the
HTML content before we can reliably use jQuery.
h1 wasn’t in the DOM yet!
30. DOM
“I’m ready!”
Listen for “I’m ready” then run <code>
The DOM ready event
HTML
1.1 What is jQuery?
100%0% 50%
How can we listen for this signal?
31. DOM
“I’m ready!”
Listening for document ready
1.1 What is jQuery?
jQuery(document).ready(function(){
});
Will only run this code once the DOM is “ready”
<code>
32. Our completed code
1.1 What is jQuery?
jQuery(document).ready(function(){
});
$("h1").text("Where to?");
35. find them
modify their text
Changing multiple elements at once
HTML document
How do we change the text of
every <li> in this page?
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul>
1.2 Using jQuery
36. Load HTML into the DOM
HTML document
body
h1
h2
Where do...
Plan your...
1.2 Using jQuery
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul> ul
Rome
li
Paris
li
Rio
li
37. Selecting multiple elements
$("li")
HTML document
body
h1
li
li
li
h2
Where do...
Plan your...
1.2 Using jQuery
ul
Rome
li
Paris
li
Rio
li;
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul>
38. Modifying each of their text nodes
HTML document
body
h1
h2
Where do...
Plan your...
1.2 Using jQuery
ul
li
li
li.text("Orlando");$("li")
Rome
Paris
Rio
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul>
Orlando
Orlando
Orlando
39. We can find elements by ID or Class
p { ... }
#container { ... }
.articles { ... }
$("p");
$("#container");
$(".articles");
1.2 Using jQuery
CSS jQuery
40. find it using the ID
Changing multiple elements at once
HTML document
How do we specifically select the <ul>
that has a “destinations” ID?
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul>
1.2 Using jQuery
41. Selecting by unique ID
$("#destinations");
HTML document
body
h1
h2
Where do...
Plan your...
1.2 Using jQuery
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul> ul
Rome
li
Paris
li
Rio
li
id="destinations"
class="promo"
ul
42. find it using the class
Changing multiple elements at once
HTML document
How can we select just the <li> that
has a “promo” class attribute?
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul>
1.2 Using jQuery
43. Selecting by Class Name
$(".promo");
HTML document
body
h1
h2
Where do...
Plan your...
1.2 Using jQuery
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul> ul
Rome
li
Paris
li
Rio
li class="promo"
id="destinations"
li
46. 2.1 Searching the DOM
Selecting descendants
HTML document
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul>
How do we find the <li> elements that are
inside of the <ul> with a “destinations” ID?
descendant selector
47. li
li
li
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Paris</li>
<li>Rome</li>
<li class='promo'>Rio</li>
</ul>
Using the descendant selector
$("#destinations li");
HTML document
body
h1
h2
Where do...
Plan your...
ul
Rome
li
Paris
li
Rio
li
the space matters
2.1 Searching the DOM
parent descendant
48. <li>Paris</li>
<li>Rome</li>
<li class='promo'>Rio</li>
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>
<ul id="france">
</ul>
</li>
</ul>
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
HTML document
How do we find only the <li> elements that are
children of the “destinations” <ul>?
descendant selector?
2.1 Searching the DOM
Selecting direct children
HTML document
49. ul
li
li
Paris
li
li
li
li
li
Selecting direct children
$("#destinations li");
HTML document
body
ul
Rome
Rio
li
2.1 Searching the DOM
...
we don’t want this
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>
<ul id="france">
<li>Paris</li>
</ul>
</li>
<li class='promo'>Rio</li>
</ul>
50. How do we find only the <li> elements that are
direct children of the “destinations” <ul> then?
child selector
Selecting only direct children
HTML document
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>
<ul id="france">
<li>Paris</li>
</ul>
</li>
<li class='promo'>Rio</li>
</div>
2.1 Searching the DOM
51. li
li
Paris
ul
li
li
li
li
body
ul
Rome
Rio
li
...
Selecting only direct children
$("#destinations > li");
HTML document
the sign matters
parent child
not selected
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>
<ul id="france">
<li>Paris</li>
</ul>
</li>
<li class='promo'>Rio</li>
</ul>
52. How do we find only elements
with either a “promo” class or a “france” ID
multiple selector
Selecting multiple elements
HTML document
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>
<ul id="france">
<li>Paris</li>
</ul>
</li>
<li class='promo'>Rio</li>
</ul>
2.1 Searching the DOM
53. ul
lili
ul
Selecting multiple elements
$(".promo, #france");
HTML document
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>
<ul id="france">
<li>Paris</li>
</ul>
</li>
<li class='promo'>Rio</li>
</ul>
the comma matters
li
li
Paris
li
body
ul
Rome
Rio
...
57. 2.2 Traversing
Walking the DOM by traversing it
HTML document
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul>
Can we find all the <li> elements that
the “destinations” list contains without
using a descendant selector?
filter by traversing
61. HTML document
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul>
Walking the DOM
Can we find the middle list item, knowing
there is no filter to find it unlike :first or :last?
traversing
2.2 Traversing
65. HTML document
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<li>Paris</li>
<li class='promo'>Rio</li>
</ul>
Walking up the DOM
If we started by selecting a child, can we figure
out what element is its direct parent?
traversing up
2.2 Traversing
68. Walking down the DOM
HTML document
<h1>Where do you want to go?</h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
<li>Rome</li>
<ul id="france">
<li>Paris</li>
</ul>
<li class='promo'>Rio</li>
</ul>
With a parent that has many children who in
turn have their own children, how could we
find only the first generation of children?
traversing down
2.2 Traversing
69. Walking the DOM up and down
$("#destinations").children("li");
children(), unlike find(), only selects direct children
ul
li
li
Paris
li
li
li
li
body
ul
Rome
Rio
li
...
id="destinations"
2.2 Traversing
73. remove a DOM node
li
DOM representation of the document
DOCUMENT
Hawaiian Vac...
h2
Get Price
button
p
$399.99
Appending to the DOM
class="vacation"
append a new DOM node1
2
3.1 Manipulating the DOM
74. application.js
Appending to the DOM
DOCUMENT
h2
Get Price
button
p
$399.99
li
var price = $('<p>From $399.99</p>');
var price = "From $399.99";
var price = "<p>From $399.99</p>";
Creates a node but doesn’t add it to the DOM
Price node (not in the DOM yet)
$(document).ready(function() {
// create a <p> node with the price
});
3.1 Manipulating the DOM
class="vacation"
Hawaiian Vac...
78. var price = $('<p>From $399.99</p>');
$('.vacation').prepend(price);
application.js
Adds the node to the top of .vacation
$(document).ready(function() {
});
Prepend
li
DOCUMENT
p
$399.99
h2
Get Price
button
3.1 Manipulating the DOM
class="vacation"
Hawaiian Vac...
79. application.js
3.1 Manipulating the DOM
Prepend and Append
Puts the price node at the bottom of .vacation
$('.vacation').append(price);
$(document).ready(function() {
var price = $('<p>From $399.99</p>');
});
li
DOCUMENT
p
$399.99
class="vacation"
h2
Get Price
button
Hawaiian Vac...
80. application.js
$(document).ready(function() {
3.1 Manipulating the DOM
Removing from the DOM
Removes the <button> from the DOM
$('button').remove();
var price = $('<p>From $399.99</p>');
$('.vacation').append(price);
});
li
DOCUMENT
p
$399.99
class="vacation"
h2
Get Price
button
Hawaiian Vac...
84. $(document).ready(<event handler function>);
Passing in a function
function() {
// executing the function runs the code
// between the braces
}
The ready method takes an event handler function as argument
We create a function with the function keyword
And we pass this function as an argument to the ready method.
3.2 Acting on Interaction
$(document).ready(function() {
// this function runs when the DOM is ready
});
86. application.js
Watching for Click
DOCUMENT
Hawaiian Vacation
h2
Get Price
button
li class="vacation"
Target all buttons
Watch for any clicks
Run the code inside of this function
3.2 Acting on Interaction
$('button').on('click', function() {
// runs when any button is clicked
});
$(document).ready(function() {
// runs when the DOM is ready
});
.on(<event>, <event handler>)
jQuery Object Methods
87. application.js
Removing from the DOM
DOCUMENT
Hawaiian Vacation
h2
Get Price
button
li
runs when the DOM is ready
runs when a button is clicked
3.2 Acting on Interaction
$(document).ready(function() {
$('button').on('click', function() {
});
// run this function on click
});
class="vacation"
88. application.js
Removing from the DOM
3.2 Acting on Interaction
var price = $('<p>From $399.99</p>');
$('.vacation').append(price);
$('button').remove();
$(document).ready(function() {
$('button').on('click', function() {
});
});
DOCUMENT
Hawaiian Vacation
h2
Get Price
button
p
$399.99
li class="vacation"
89. Now the price will be shown when we click the button
92. $(document).ready(function() {
$('button').on('click', function() {
var price = $('<p>From $399.99</p>');
$('.vacation').append(price);
application.js
The price will be appended to
both .vacation elements
3.3 Refactor Using Traversing
Working, but with Errors
ul
DOCUMENT
li
p
class="vacation"
li
p
class="vacation"
div id="vacations"
Every button will be removed
$('button').remove();
});
});
button
buttonbutton
button
93. $(this).remove();
An Introduction to $(this)
application.js
ul
DOCUMENT
li
button
p
li
button
p
div
If clicked, the button will be ‘this’
this.remove();
Not a jQuery object, needs to be converted
3.3 Refactor Using Traversing
$(document).ready(function() {
$('button').on('click', function() {
var price = $('<p>From $399.99</p>');
$('.vacation').append(price);
$('button').remove();
});
});
id="vacations"
class="vacation"
class="vacation"
94. application.js
An Introduction to $(this)
3.3 Refactor Using Traversing
ul
DOCUMENT
li
button
p
li
button
p
div
Only removes whichever button was clicked
$(document).ready(function() {
$('button').on('click', function() {
var price = $('<p>From $399.99</p>');
$('.vacation').append(price);
});
});
$(this).remove();
class="vacation"
class="vacation"
id="vacations"
96. application.js
Adds the <p> node after the <button>
Traversing from $(this)
ul
DOCUMENT
Hawaiian Vac...
li
h2
Get Price
button
p
$399.99
class="vacation"
3.3 Refactor Using Traversing
$(this).after(price);
$(document).ready(function() {
$('button').on('click', function() {
var price = $('<p>From $399.99</p>');
$(this).remove();
});
});
$('.vacation').append(price);
97. application.js
Traversing from $(this)
3.3 Refactor Using Traversing
Add the price as a sibling after button
ul
DOCUMENT
Hawaiian Vac...
li
h2
Get Price
button
$(document).ready(function() {
$('button').on('click', function() {
var price = $('<p>From $399.99</p>');
$(this).remove();
});
});
$(this).after(price);
class="vacation"
p
$399.99
98. application.js
What if the button is moved?
ul
DOCUMENT
Hawaiian Vac...
li
h2
Get Price
button
p
$399.99
3.3 Refactor Using Traversing
div
If the button is moved, the price will be moved
How do we keep the
price as a child of <li>?
$(document).ready(function() {
$('button').on('click', function() {
var price = $('<p>From $399.99</p>');
$(this).remove();
});
});
$(this).after(price);
class="vacation"
99. application.js
Using .closest(<selector>)
3.3 Refactor Using Traversing
ul
DOCUMENT
Hawaiian Vac...
li
h2
Get Price
button
div
$(this).after(price);
$(this).parents('.vacation').append(price);
$(this).parent().parent().append(price);
p
$399.99
$(this).closest('.vacation').append(price);
class="vacation"
100. application.js
$(document).ready(function() {
$('button').on('click', function() {
var price = $('<p>From $399.99</p>');
$(this).remove();
});
});
ul
DOCUMENT
Hawaiian Vac...
li
h2
Get Price
button
p
$399.99
Our Finished Handler
Adds the <p> node at the bottom of .vacation
3.3 Refactor Using Traversing
$(this).closest('.vacation').append(price);
class="vacation"
103. How do we allow vacations to have different prices?
104. <li class="vacation onsale"
<h3>Hawaiian Vacation</h3>
<button>Get Price</button>
<ul class='comments'>
<li>Amazing deal!</li>
<li>Want to go!</li>
</ul>
</li>
index.html
$('.vacation').first().data('price');
All data attributes begin with ‘data-’
"399.99"
Tackling the HTML
data-price='399.99'>
.data(<name>)
jQuery Object Methods
.data(<name>, <value>)
3.4 Traversing & Filtering
105. var amount = $(this).closest('.vacation').data('price');
application.js
Reads from the data-price attribute
Joins two strings to create the price
Refactoring ‘Get Price’
$(document).ready(function() {
$('button').on('click', function() {
var price = $('<p>From $399.99</p>');
$(this).closest('.vacation').append(price);
$(this).remove();
});
});
var price = $('<p>From $'+amount+'</p>');
3.4 Traversing & Filtering
106. application.js
Refactoring ‘Get Price’
$(document).ready(function() {
$('button').on('click', function() {
$(this).closest('.vacation').append(price);
$(this).remove();
});
}); Each vacation can have its own price
var amount = $(this).closest('.vacation').data('price');
var price = $('<p>From $'+amount+'</p>');
3.4 Traversing & Filtering
107. var amount = $(this).closest('.vacation').data('price');
$(this).closest('.vacation').append(price);
application.js
Reusing jQuery Objects
$(document).ready(function() {
$('button').on('click', function() {
var vacation = $(this).closest('.vacation');
var amount = vacation.data('price');
vacation.append(price);
var price = $('<p>From $'+amount+'</p>');
$(this).remove();
});
});
3.4 Traversing & Filtering
108. vacation.append(price);
var amount = vacation.data('price');
application.js
Reusing jQuery Objects
var vacation = $(this).closest('.vacation');
$(document).ready(function() {
$('button').on('click', function() {
var price = $('<p>From $'+amount+'</p>');
$(this).remove();
});
});
We’ll only query the DOM
once for this element
3.4 Traversing & Filtering
110. application.js
$('.vacation').on('click', 'button', function() {});
If we add new buttons anywhere, they will trigger this click handler
$('.vacation button').on('click', function() {});
On With a Selector
Only target a ‘button’
if it’s inside a ‘.vacation’
$(document).ready(function() {
$('button').on('click', function() {
...
});
});
3.4 Traversing & Filtering
112. <div id='filters'>
...
<button class='onsale-filter'>On Sale Now</button>
<button class='expiring-filter'>Expiring</button>
...
</div>
index.html
We’ll highlight vacations with these traits
Filtering HTML
We’ll write 2 event handlers for our buttons
3.4 Traversing & Filtering
113. application.js
Filtering for Vacations On sale
div
DOCUMENT
button class="onsale-filter"
button class="expiring-filter"
// find all vacations that are on-sale
// add a class to these vacations
});
$('#filters').on('click', '.onsale-filter',
function() { id="filters"
3.4 Traversing & Filtering
114. Filtering for Vacations On sale
ul
DOCUMENT
li
ul
li
li
li
class="vacation onsale"
class="vacation"
class="vacation"
class="comments"
$('.vacation.onsale')
$('.vacation').filter('.onsale')
Finds elements with a class
of .vacation and .onsale
application.js
// find all vacations that are on-sale
// add a class to these vacations
});
$('#filters').on('click', '.onsale-filter',
function() {
lili
3.4 Traversing & Filtering
115. Class Manipulation
application.js
Filtering for Vacations On sale
$('.vacation').filter('.onsale').addClass('highlighted');
.addClass(<class>) .removeClass(<class>)
$('#filters').on('click', '.onsale-filter',
function() {
$('.vacation').filter('.onsale')
// add a class to these vacations
});
ul
DOCUMENT
li
ul
li
li
li
lili
3.4 Traversing & Filtering
class="vacation onsale"
class="vacation"
class="vacation"
class="comments"
116. application.js
Filtering for Vacations On sale
Finds only the right vacations Adds a class of ‘highlighted’
The same can be done for our expiring filter
$('#filters').on('click', '.onsale-filter', function() {
$('.vacation').filter('.onsale').addClass('highlighted');
});
$('.vacation').filter('.expiring').addClass('highlighted');
});
$('#filters').on('click', '.expiring-filter', function() {
3.4 Traversing & Filtering
117. How do we make sure not all vacations are highlighted?
123. .ticket {
display: none;
}
index.html
Hide ticket on page load
Adding Ticket Confirmation
find the ticket
show the ticket
watch for click
Clicking this button...
...will show the ticket
<li class="confirmation">
...
<button>FLIGHT DETAILS</button>
<ul class="ticket">...</ul>
</li>
4.1 On DOM Load
124. application.js
$('.confirmation').on('click', 'button', function() {
});
Using slideDown to Show Elements
index.html
jQuery Object Methods
.slideDown()
.slideUp()
.slideToggle()
$(this).closest('.confirmation').find('.ticket').slideDown();
<li class="confirmation">
...
<ul class="ticket">...</ul>
</li>
<button>FLIGHT DETAILS</button>
4.1 On DOM Load
Searches up through ancestors Searches down through children
127. $('.confirmation').on('click', 'button', function() {
$(this).closest('.confirmation').find('.ticket').slideDown();
});
application.js
alert($('button').length);
The alert dialog
Debugging with Alert
4.1 On DOM Load
128. application.js
$(document).ready(function() {
});
The button is found after the DOM has loaded
We Forgot $(document).ready() already
alert($('button').length);
$('.confirmation').on('click', 'button', function() {
$(this).closest('.confirmation').find('.ticket').slideDown();
});
4.1 On DOM Load
129. Now that the DOM has loaded, jQuery can find our button
131. What if we also want to show the ticket when they
hover over the <h3> tag?
132. application.js
$(document).ready(function() {
$('.confirmation').on('click', 'button', function() {
$(this).closest('.confirmation').find('.ticket').slideDown();
});
});
What event should we watch for?
Deciding on an Event
$('.confirmation').on('?', 'h3', function() {
$(this).closest('.confirmation').find('.ticket').slideDown();
});
Fires when the mouse is first positioned over the element
click
Mouse Events
dblclick
focusin
focusout
mouseover
mouseup mouseout mouseleave
mousemove mouseentermousedown
4.2 Expanding on on()
133. application.js
$(document).ready(function() {
$('.confirmation').on('click', 'button', function() {
$(this).closest('.confirmation').find('.ticket').slideDown();
});
$('.confirmation').on( , 'h3', function() {
$(this).closest('.confirmation').find('.ticket').slideDown();
});
});
Mouse Events
Show the ticket when the mouse
is positioned over the h3
'mouseenter'
4.2 Expanding on on()
135. application.js
$(document).ready(function() {
$('.confirmation').on('click', 'button', function() {
$(this).closest('.confirmation').find('.ticket').slideDown();
});
$('.confirmation').on('mouseenter', 'h3', function() {
$(this).closest('.confirmation').find('.ticket').slideDown();
});
});
Extract out and name our event handler
Refactoring Handler Functions
This code is duplicated, how can we refactor this?
showTicket () {function
$(this).closest('.confirmation').find('.ticket').slideDown();
}
4.2 Expanding on on()
136. application.js
$(document).ready(function() {
$('.confirmation').on('click', 'button', showTicket);
$('.confirmation').on('mouseenter', 'h3', showTicket);
});
Don’t add () at the end - that would execute the function immediately
Refactoring Handler Functions
showTicket () {function
$(this).closest('.confirmation').find('.ticket').slideDown();
}
4.2 Expanding on on()
140. <div class="vacation" data-price='399.99'>
<h3>Hawaiian Vacation</h3>
<p>$399.99 per ticket</p>
<p>
Tickets:
<input type='number' class='quantity' value='1' />
</p>
</div>
<p>Total Price: $<span id='total'>399.99</span></p>
index.html
...we’ll update the calculated price here
When this updates...
Trip Planner Page
4.3 Keyboard Events
141. Keyboard Events Form Events
$(document).ready(function() {
$('.vacation').on('?', '.quantity', function() {
});
});
application.js
http://api.jquery.com/category/events/keyboard-events/
http://api.jquery.com/category/events/form-events/
Which event should we use?
keydown
keypress
keyup
blur change
focus
select
submit
Keyboard and Form Events
4.3 Keyboard Events
142. $(document).ready(function() {
$('.vacation').on('keyup', '.quantity', function() {
});
});
application.js
Writing our Event Handler
DOCUMENT
li .vacation
span
p
input
#total
var price = $(this).closest('.vacation').data('price');
Returns price as a string
Use + to convert the string to a number
// Get the price for this vacation
.quantity
p
'399.99'
399.99
// Get the quantity entered
// Set the total to price * quantity
4.3 Keyboard Events
var price = +$(this).closest('.vacation').data('price');
143. application.js
Getting the Quantity of Tickets
DOCUMENT
li .vacation
span
p
input .quantity
p
#total
jQuery Object Methods
.val()
.val(<new value>)
Sets quantity to a number
var quantity = this.val(); Errors - not a jQuery object
var quantity = $(this).val(); Sets quantity to a string
var price = +$(this).closest('.vacation').data('price');
$(document).ready(function() {
$('.vacation').on('keyup', '.quantity', function() {
});
});
// Get the quantity entered
// Set the total to price * quantity
var quantity = +$(this).val();
2
'2'
144. application.js
Setting the Total Price
DOCUMENT
li .vacation
span
p
input .quantity
p
#total
You can pass a number or a string to the .text() method
$('#total').text(price * quantity);
4.3 Keyboard Events
$(document).ready(function() {
$('.vacation').on('keyup', '.quantity', function() {
});
});
// Set the total to price * quantity
var price = +$(this).closest('.vacation').data('price');
var quantity = +$(this).val();
145. application.js
The Completed Event Handler
DOCUMENT
li .vacation
span
p
input .quantity
p
#totalWhenever the quantity is changed, the total will be updated
4.3 Keyboard Events
$(document).ready(function() {
$('.vacation').on('keyup', '.quantity', function() {
});
});
var price = +$(this).closest('.vacation').data('price');
var quantity = +$(this).val();
$('#total').text(price * quantity);
149. Clicking this link...
Preparing for Flight
ul
DOCUMENT
Show Comments
li
a
li
ul
li
...will show the comments
.vacation
.expand
.comments
.comments {
display: none;
}
application.css
application.js
We need to write the event handler
// Find the comments ul
// Show the comments ul
$(document).ready(function() {
$('.vacation').on('click', '.expand', function() {
});
});
4.4 Link Layover
150. Preparing for Flight
ul
DOCUMENT
Show Comments
li
a
li
ul
li
.vacation
.expand
.comments
Find the .comments ul using traversing
$(this).closest('.vacation').find('.comments')
application.js
// Find the comments ul
// Show the comments ul
$(document).ready(function() {
$('.vacation').on('click', '.expand', function() {
});
});
4.4 Link Layover
151. jQuery Object Methods
Preparing for Flight
.fadeToggle().fadeIn() .fadeOut()
These are similar to the slide methods
$(document).ready(function() {
$('.vacation').on('click', '.expand', function() {
$(this).closest('.vacation')
.find('.comments')
// Show the comments ul
});
});
ul
DOCUMENT
Show Comments
li
a
li
ul
li
.vacation
.expand
.comments
application.js
4.4 Link Layover
152. $(document).ready(function() {
$('.vacation').on('click', '.expand', function() {
$(this).closest('.vacation')
.find('.comments')
});
});
ul
DOCUMENT
Show Comments
li
a
li
ul
li
fadeIn() .comments on first click,
fadeOut() .comments on next click.
Handling the Click
.vacation
.expand
.comments
4.4 Link Layover
application.js
.fadeToggle();
154. <a href='#' class='expand'>Show Comments</a>
index.html
How the Browser Handles the Click
ul
DOCUMENT
Show Comments
li
a
li
ul
li
.vacation
.expand
.comments
The click event will “bubble up”
to each parent node
4.4 Link Layover
Follows the link!
(goes to the top of the page)
155. });
The Event Object
Add the event parameter
application.js
DOM TREE
ul
DOCUMENT
Show Comments
li
a
li
ul
li
.vacation
.expand
.comments
$(document).ready(function() {
$('.vacation').on('click', '.expand',
function(event) {
$(this).closest('.vacation')
.find('.comments')
.fadeToggle();
});
4.4 Link Layover
156. event.stopPropagation()
DOM TREE
ul
DOCUMENT
Show Comments
li
a
li
ul
li
.vacation
.expand
.comments
The browser will still handle the click event but will prevent it
from “bubbling up” to each parent node.
$(document).ready(function() {
$('.vacation').on('click', '.expand',
function(event) {
event.stopPropagation();
$(this).closest('.vacation')
.find('.comments')
.fadeToggle();
});
});
4.4 Link Layover
application.js
157. $(document).ready(function() {
$('.vacation').on('click', '.expand',
function(event) {
$(this).closest('.vacation')
.find('.comments')
.fadeToggle();
}
);
});
The click event will “bubble up” but the browser won’t handle it
event.preventDefault()
DOM TREE
ul
DOCUMENT
Show Comments
li
a
li
ul
li
.vacation
.expand
.comments
event.preventDefault();
4.4 Link Layover
application.js
162. 5.1 Taming CSS
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
...and allow people to click
on the <li> element
Changing our Style
p .price
Let’s make all .vacation elements clickable...
163. 5.1 Taming CSS
application.js
Changing the Style
$(this).css('background-color', '#252b30')
.css('border-color', '1px solid #967');
$(this).css({'background-color': '#252b30',
'border-color': '1px solid #967'});
Passing in a JavaScript Object as an argument is a common jQuery pattern
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p
jQuery Object Methods
.css(<attr>, <value>)
.css(<attr>)
.css(<object>)
.price
$(this).css('background-color', '#252b30');
$(this).css('border-color', '1px solid #967');
});
});
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
164. 5.1 Taming CSS
Showing the Price
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p
application.js
jQuery Object Methods
.show()
.hide()
$(this).find('.price').css('display', 'block');
.price
$(this).find('.price').show();
Same as CSS syntax, but easier to read and understand
});
});
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).css({'background-color': '#252b30',
'border-color': '1px solid #967'});
165. 5.1 Taming CSS
Showing the Price
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p
application.js
.price
Highlights the Vacation Package and shows the price
});
});
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).find('.price').show();
$(this).css({'background-color': '#252b30',
'border-color': '1px solid #967'});
167. 5.1 Taming CSS
Moving Styles to External CSS
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p
application.js
});
});
.price
Can we move these to a CSS stylesheet?application.css
border-color: 1px solid #967;
}
.highlighted .price {
display: block;
}
$(this).css({'background-color': '#563',
'border-color': '1px solid #967'});
$(this).find('.price').show();
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
#563;
.highlighted {
background-color:
$(this).addClass('highlighted');
168. 5.1 Taming CSS
Moving Styles to External CSS
application.js
});
});
It’s now much easier to manipulate with external CSS styles
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p .price
application.css
border-color: 1px solid #967;
}
.highlighted .price {
display: block;
}
#563;
.highlighted {
background-color:
$(this).addClass('highlighted');
169. 5.1 Taming CSS
Moving Styles to External CSS
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p
application.js
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).addClass('highlighted');
});
});
.price
We can only show price, but how would we hide price?
$(this).toggleClass('highlighted');
jQuery Object Methods
.toggleClass()
.addClass(<class>)
.removeClass(<class>)
Adds the class if $(this) doesn’t have it, removes it if $(this) already has it
173. What can we do to add a bit more movement to this?
174. Takes in a JavaScript object
similar to the .css() method
Adding Movement
jQuery Object Methods
.animate(<object>)
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p .price
application.js
$(this).css({'top': '-10px'});
The box will jump up 10 px
$(this).animate({'top': '-10px'});
5.2 Animation
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).toggleClass('highlighted');
});
});
175. Adding Movement
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p .price
application.js
Will adjust a CSS property pixel by pixel in order to animate it
5.2 Animation
$(this).animate({'top': '-10px'});
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).toggleClass('highlighted');
});
});
177. Moving Back Down
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p .price
application.js
How do we set ‘top’ to ‘0px’ if a second click occurs?
“If statements” allow your code to make decisions at runtime
5.2 Animation
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).toggleClass('highlighted');
});
});
$(this).animate({'top': '-10px'});
} else {
// animate the vacation up
}
// animate the vacation back down
if(<vacation has the class highlighted>) {
178. Moving Back Down
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p .price
application.js
jQuery Object Methods
.hasClass(<class>)
$(this).hasClass('highlighted')
Returns true or false
5.2 Animation
true
;
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).toggleClass('highlighted');
});
});
$(this).animate({'top': '-10px'});
$(this).animate({'top': '0px'});
} else {
}
if(<vacation has the class highlighted>) {
179. Moving Back Down
application.js
Our vacation package will move up and down
5.2 Animation
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p .price
$(this).hasClass('highlighted')
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).toggleClass('highlighted');
});
});
$(this).animate({'top': '-10px'});
$(this).animate({'top': '0px'});
} else {
}
if( ) {
180. Could we speed this up a little? Our customers don’t have all day.
181. Changing the Speed
$(this).animate({'top': '-10px'});
$(this).animate({'top': '-10px'}, 400);
We can optionally pass in the speed as a
second argument to animate()
$(this).animate({'top': '-10px'}, 'fast');
$(this).animate({'top': '-10px'}, 200);
$(this).animate({'top': '-10px'}, 'slow');
$(this).animate({'top': '-10px'}, 600);
Effects methods like animate(), slideToggle() and fadeToggle()
can also be given a specific speed as a String or in milliseconds
5.2 Animation
182. $(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).toggleClass('highlighted');
if($(this).hasClass('highlighted')) {
} else {
}
});
});
Moving Back Down
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p .price
application.js
And with this we now have specific speeds for our animation
5.2 Animation
$(this).animate({'top': '-10px'}, 'fast');
$(this).animate({'top': '0px'}, 'fast');
184. The Next Step with CSS Animations
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p .price
application.js
if($(this).hasClass('highlighted')) {
$(this).animate({'top': '-10px'}, 'fast');
} else {
$(this).animate({'top': '0px'}, 'fast');
}
5.2 Animation
Isn’t this still styling? Shouldn’t it be inside of a stylesheet?
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).toggleClass('highlighted');
});
});
185. Animation Duration
application.js
5.2 Animation
transition: top 0.2s;
}
.highlighted {
top: -10px;
}
Will only work with browsers that implement CSS transitions
.vacation {
application.css
});
});
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).toggleClass('highlighted');
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p .price
186. Working with Modern Browsers
5.2 Animation
application.css
-moz-transition: top 0.2s;
-o-transition: top 0.2s;
-webkit-transition: top 0.2s;
Unlike jQuery, with CSS we have
to account for specific browsers
.vacation {
application.js
$(document).ready(function() {
$('#vacations').on('click', '.vacation', function() {
$(this).toggleClass('highlighted');
});
});
ul
DOM representation
DOCUMENT
li .vacation
div #vacations
p .price
transition: top 0.2s;
}
.highlighted {
top: -10px;
}