Tek Raj Chhetri Code for Humans not for machine.

Slides:



Advertisements
Similar presentations
The jQuery library. What is jQuery ? A javascript lightweight library Is very easy to use Is powerful Is cross-browser compatible Downloadable from jQuery.com,
Advertisements

SE-2840 Dr. Mark L. Hornick1 jQuery. jQuery is a library of JavaScript functions Helps minimize the amount of JavaScript you have to write in order to:
JQuery A Javascript Library Hard things made eas(ier) Norman White.
JQUERY/AJAX ALIREZA KHATAMIAN DELARAM YAZDANSEPAS.
CS428 Web Engineering Lecture 15 Introduction to Jquery.
JQuery. What is jQuery? jQuery is a fast, small, and feature-rich JavaScript library that simplifies HTML document traversing and manipulation event handling.
Philly.NET Hands-On jQuery + Plug-ins Bill Wolff, Rob Keiser.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
Fundamentals, DOM, Events, AJAX, UI Doncho Minkov Telerik Corporation
Definition from Wikipedia.  The Prototype JavaScript Framework  implemented as a single file of JavaScript code  named prototype.js (
M. Taimoor Khan Courtesy: Norman White.
PhpXperts What is jQuery Javascript Library Fast and concise Simplifies the interaction between HTML and JavaScript.
JQuery March 09 th,2009 Create by
A really fairly simple guide to: mobile browser-based application development (part 4, JQuery & DOM) Chris Greenhalgh G54UBI / Chris Greenhalgh.
JQuery Adding behaviour…. Lecture Plan Review of last lesson Adding behaviour –click, mouseover Animation –fade, slideDown Navigation –parent, find, next.
JQUERY | INTRODUCTION. jQuery  Open source JavaScript library  Simplifies the interactions between  HTML document, or the Document Object Model (DOM),
Jquery Nasrullah. Jquery jQuery is a JavaScript Library. jQuery greatly simplifies JavaScript programming. jQuery is easy to learn.
INTRODUCTION TO HTML5 Using jQuery with HTML5. Introducing jQuery  Although it is not a part of any W3C or WHATWG specification, jQuery performs an important.
Animation & Effects Using JQuery. What is jQuery? jQuery is a lightweight, JavaScript library. The purpose of jQuery is to make it much easier to use.
JQuery Youn-Hee Han
CHAPTER 5 jQuery อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Unleash the Power of jQuery Doncho Minkov Telerik Software Academy academy.telerik.com Senior Technical Trainer
JQuery Introduction © Copyright 2014, Fred McClurg All Rights Reserved.
JavaScript Library. What is jQuery jQuery is a lightweight JavaScript library. The purpose is to make it easier to use JavaScript code on your website.
Unleash the Power of jQuery Learning & Development Team Telerik Software Academy.
JQuery JavaScript is a powerful language but it is not always easy to work with. jQuery is a JavaScript library that helps with: – HTML document traversal.
Web Programming Language Week 9 Dr. Ken Cosh Introducing jQuery.
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
1 What is JQuery. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax* interactions.
IS2802 Introduction to Multimedia Applications for Business Lecture 07: Introduction to jQuery Rob Gleasure
Unit 13 –JQuery Basics Instructor: Brent Presley.
Web Technologies Lecture 8 JQuery. “A fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax.
SHAREPOINT & JQUERY. Hi, my name and I am a product manager at lightning tools. I have been working with SharePoint for 5 years.
Introduction to JQuery COGS 187A – Fall JQuery jQuery is a JavaScript library, and allows us to manipulate HTML and CSS after the page has been.
JQuery “write less, do more”. jQuery - Introduction Simply a JavaScript library to simplify JavaScript programming itself Wraps long standard JavaScript.
LECTURE #4: JQUERY AND FORM VALIDATION Josh Kaine Josh Kaine 4/1/2016.
JQuery Tutorial. What is jQuery jQuery is a JavaScript Library The purpose of jQuery is to make it much easier to use JavaScript on your website JavaScript.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
MICROSOFT AJAX CDN (CONTENT DELIVERY NETWORK) Make Your ASP.NET site faster to retrieve.
CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.
Shaun Geisert Matt Trice. What is jQuery?  Open source Javascript library/framework Created by John Resig  Their tagline – “The Write Less, Do More.
SharePoint & jQuery. About me Phill Duffy – Product Manager at Lightning Tools Ltd – Author of ‘Pro SharePoint with jQuery’ – MCTS Application Developer.
JQuery is a fast, small, and feature-rich javascript library. It makes things like HTML document traversal and manipulation, event handling, animation,
JQuery Element & Attribute Selectors, Events, HTML Manipulation, & CSS Manipulation.
JQuery.
JQuery Fundamentals Introduction Tutorial Videos
What is jQuery?.
-By Yogita Nirmal.
12/04/12 JQuery I took these slides from the site because they were pretty good looking. Instructions for editing school and department titles: Select.
Unleash the Power of jQuery
Intro to jQuery jQuery is a popular, and extensible, JavaScript library Supports … DOM manipulation CSS manipulation HTML event methods Effects & animations.
Tek Raj Chhetri Code for Humans not for machine.
Introduction to Web programming
JQuery Basics 소속 / 작성자 이 문서는 나눔글꼴로 작성되었습니다. 설치하기.
JQuery.
JQUERY Online TRAINING AT GOLOGICA
Fundamentals, DOM, Events, AJAX, UI
The Cliff Notes Version
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
JQuery with ASP.NET.
Web Programming Language
..
Javascript and JQuery SRM DSC.
E-commerce Applications Development
Document Object Model.
Web Programming Language
Introduction to jQuery
SEEM4540 Tutorial 3 jQuery Wong Wai Chung.
JQuery.
Presentation transcript:

Tek Raj Chhetri Code for Humans not for machine. JQuery Tek Raj Chhetri Code for Humans not for machine.

jQuery by Tek Raj Chhetri Table of Content Introduction Getting Started with jQuery Selectors and Methods Events jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Introduction A fast, small and feature rich java script library. (jQuery.com) Why learn jQuery? Write less, do more. $(“#text”).addClass(“show”).show(“slow”); Performance jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Introduction Plugins - A new method that we use to extend jQuery’s object. jQuery makes DOM less scary Javascript Way jQuery Way document.getElementsByTagName('p')[0].innerHTML = "Change the page"; $('p').html('Change the page'); jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Introduction Where can jQuery be used? DOM Traversal and Manipulation Get the <button> element with the class 'continue' and change its HTML to 'Next Step...‘ $( "button.continue" ).html( "Next Step..." ) Event Handling Show the #banner-message element that is hidden with display:none in its CSS when any button in #button-container is clicked. var hiddenBox = $( "#banner-message" ); $( "#button-container button" ).on( "click", function( event ) { hiddenBox.show(); }); jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Introduction Ajax Call a local script on the server /api/getWeather with the query parameter zipcode=97201 and replace the element #weather-temp's html with the returned text. $.ajax({ url: "/api/getWeather", data: { zipcode: 97201 }, success: function( result ) { $( "#weather-temp" ).html( "<strong>" + result + "</strong> degrees" ); } }); jQuery by Tek Raj Chhetri

Getting Started with jQuery jQuery by Tek Raj Chhetri

Getting Started with jQuery There are two ways to get started with jQuery Using CDN (Content Delivery Network) Using locally downloaded file jQuery by Tek Raj Chhetri

Getting Started with jQuery (Using CDN) Step 1 Decide which CDN provider to use Step 2 Go to that CDN Link Step 3 Copy the link of file Step 4 Include the copied link in script src tag. jQuery, Cloudfare, Google Eg: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> jQuery by Tek Raj Chhetri

Getting Started with jQuery (Using Local File) Step 1 Go to jQuery.com Step 2 Find the latest version Step 3 Download Step 4 Include the downloaded file. Eg: <script src=“js/jquery/3.2.1/jquery.min.js"></script> jQuery by Tek Raj Chhetri

Getting Started with jQuery <Doctype html> <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> </head> <body> <script type="text/javascript"> $(document).ready(function(){ //do your task }); </script> </body> </html> <script src="js/jquery/3.2.1/jquery.min.js"></script> Using CDN Using Local File jQuery by Tek Raj Chhetri

Getting Started with jQuery <script type="text/javascript"> $(document).ready(function(){ // when the web page document is ready, do what's below $('button').click(function(){ // when any button is clicked, do this stuff $('h1').hide('slow'); }); </script> jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Selectors and Methods jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Selectors and Methods jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Selectors and Methods Tag selector: - selects html tag directly to manipulate $(‘p’).hide(); // hides the p tag and its content ID selector: - selects based on id provided to html tag, needs to use #. $(“#sayHello”).text(“hello I am id selector”); Class selector: - selects based on class provided to html tag, needs to use dot(.). $(“.sayHello”).text(“hello I am class selector”); jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Selectors and Methods jQuery selects the elements the same way css does H1{ text-align:left; } $(“h1”).css(“text-align”,”left”); P{ color:red; $("p").css("color", "red") Body{ Background-color:yellow; $("body").css("background-color", "yellow"); jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Selectors and Methods this selector Refers to whatever element we are working on Allows us to use jQuery method to affect current element $('.para').click(function(){ $(this).slideUp(); //this here refers to para class }); jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Selectors and Methods Following are some of the jQuery methods Css() fadeIn() fadeOut() Hide() Show() click() dblclick() mouseenter() mouseleave() Example: $("#top").sideUp(); $(".remove").fadeOut(); $(".show_slow").fadeIn(); $("#box").animate({top: 30},200); jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Events jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Events There are two ways to bind event Method 1: Convenience method or is simply a shortcut for method 2 $('.para').click(function(){ $(this).slideUp(); //this here refers to para class }); Method 2: Only when the DOM elements already exists. To add elements after page is loaded. jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Events $('.para').bind('click', function(){ $(this).slideUp(); //this here refers to para class }); jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Events Like events binding there are two ways to remove events. Method 1: Unbind all the events. $(“#myElement”).unbind(); Method 2: Unbind particular event only. $(“#myElement”).unbind(‘click’); jQuery by Tek Raj Chhetri

jQuery by Tek Raj Chhetri Thank you jQuery by Tek Raj Chhetri