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.
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.
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
This document provides an introduction to jQuery, covering its features, comparisons to other frameworks, selectors, and plugins. jQuery is an open-source JavaScript library that simplifies DOM manipulation, event handling, animations, and Ajax interactions. It uses CSS-style selectors to select and manipulate HTML elements. Some key features include DOM element selections, DOM traversal/modification, DOM manipulation based on CSS selectors, events, effects/animations, Ajax, and extensibility through plugins. The document also discusses jQuery versus other frameworks like Dojo and YUI, demonstrates basic selectors and methods, and encourages the use of plugins to add additional functionality.
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 introduces the jQuery library, which is a popular JavaScript library that simplifies tasks like HTML document traversal, event handling, animating, and Ajax interactions. It notes that over 20% of websites use jQuery and outlines some of its main capabilities like selecting elements, hiding/showing elements, and loading remote HTML. Alternatives to jQuery are mentioned but it is positioned as standing alone in popularity based on Google search volumes.
- jQuery is a JavaScript library that simplifies HTML document traversal and manipulation, events, animations and Ajax interactions for rapid web development.
- It was released in 2006 and abstracts away browser quirks to write less code using a simpler syntax.
- jQuery selects elements, handles events, performs animations and loads data asynchronously via Ajax calls to build dynamic web page content.
The document discusses jQuery and its uses and methods. It introduces jQuery as a way to write JavaScript code that works across browsers. It provides examples of how jQuery can be used to select and manipulate HTML elements using simpler syntax compared to vanilla JavaScript. Key jQuery methods are also summarized, including how to select elements, modify attributes, handle events, add/move elements, and perform animations and AJAX requests.
This document discusses jQuery, a JavaScript library. It defines jQuery as a lightweight library that allows developers to "write less, do more". It describes how jQuery works by selecting elements and running functions on them. It also covers various jQuery methods for DOM manipulation like fading, sliding, and handling events. Key points covered include selecting elements, jQuery syntax, downloading jQuery, and how to get started with basic functionality.
Getting the Most Out of jQuery Widgetsvelveeta_512
The document discusses strategies for building modular widgets in jQuery. It recommends thinking of widgets as small, decoupled components that communicate through events. Components should subscribe to and respond to events from other components, with references only going downward between layers. Each layer consumes events from lower layers and publishes events upward. The document also recommends decorating widget functions to add logging or other functionality.
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.
This document provides an overview of jQuery, a JavaScript library for DOM manipulation. It discusses jQuery's CSS selector syntax, methods for manipulating DOM elements and collections, event handling, AJAX support through methods like load() and get(), and how jQuery is extensible through plugins. The document also provides examples of DOM traversal, value retrieval, event binding, and chaining methods.
This document discusses using jQuery with Ruby on Rails. It covers including jQuery and rails.js in Rails 3 applications, reproducing CSRF meta tags, using remote links, and rendering JavaScript templates. It also discusses making AJAX requests in Rails 2 applications by returning JSON from controllers and binding to jQuery events in rails.js. The document provides an introduction and agenda for a presentation on integrating jQuery into Ruby on Rails applications.
The document summarizes new features and changes to the jQuery event system in version 1.7. Key points include:
- The .on() and .off() methods were introduced to unify event binding, removing confusion from multiple older methods. This improves performance and reduces code size.
- Event delegation was optimized through "quickIs()" to speed up selector matching, improving delegation performance by 2-4x in most browsers.
- Existing event bugs were fixed and the system was overhauled to make events more "hookable" and extensible.
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.
Things you should know about jQuery JavaScript library. A JavaScript library designed to hide painful cross-browser compatibility issues while presenting a solid, usable, API.
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 discusses various jQuery secrets including:
1. Utilities for saving and removing state from DOM elements using jQuery.data() and jQuery.removeData().
2. Hidden events like getData, setData, and changeData that are emitted when data is read, set, or changed on an element.
3. Extending jQuery with custom functions, properties, and AJAX shortcuts.
4. Binding custom events and namespaces, self-defined animation speeds, and extending jQuery plugins.
jQuery is a JavaScript library that simplifies web development and is widely used. It allows developers to select elements, manipulate DOM elements, handle events, and develop animations and AJAX interactions easily. jQuery supports cross-browser functionality and makes tasks like DOM manipulation, event handling, animation, and Ajax easier through its simple and concise API. Developers can implement jQuery either from scratch or by using existing plugins.
The Django Book Chapter 9 - Django Workshop - Taipei.pyTzu-ping Chung
This document provides an overview of template concepts in Django, including template tags, variables, contexts, loading templates, custom processors, and HTML escaping. It demonstrates how to render templates using different approaches like render_to_response and RequestContext, and configure template directories and loaders. Code samples are provided for common template tasks in Django.
jQuery is a popular JavaScript library that makes HTML document traversal and manipulation, event handling, animation, and Ajax interactions more simple. It works across browsers and allows developers to write less code using its easy-to-use API. The document discusses how jQuery works, including how to launch code on document ready, add and remove HTML classes, and use callbacks and functions when passing arguments to other functions.
This document provides an overview of what JavaScript capabilities are available in Plone and how to use them. It discusses nuts and bolts topics like injecting JavaScript and CSS, as well as how to create common interactive elements like validation, popups, tabs, and drag and drop functionality using tools like jQuery. The document is intended as an introduction for Plone developers on getting started with JavaScript in Plone.
This presentation covers some jQuery basics, as well as some general concepts you should understand about jQuery. You will find other tips and tricks sprinkled throughout before the live coding session starts.
The code from the live coding session is available here: https://github.com/dcneiner/jQuery-Bling and covers far more advanced topics than the slide portion of this presentation.
The document discusses the history and evolution of JavaScript libraries for web development. It describes how jQuery has come to dominate the market due to its simplicity and robustness. It outlines Microsoft's initial development of its own Microsoft Ajax library to support ASP.NET developers, but how it later embraced jQuery instead and now includes it with Visual Studio.
This is a recording of the Adobe Connect session done with the Northern Virginia ColdFusion Users Group discussing the open source initiative known as Team CF Advance. If you are a CFML (ColdFusion) developer who would like to learn more about this open source initiative and would like to participate, this is a good introduction to the concepts behind the team and where we are as of January 2014.
Learn more and sign-up to join the team at http://teamcfadvance.org/
- jQuery is a JavaScript library that simplifies HTML document traversal and manipulation, events, animations and Ajax interactions for rapid web development.
- It was released in 2006 and abstracts away browser quirks to write less code using a simpler syntax.
- jQuery selects elements, handles events, performs animations and loads data asynchronously via Ajax calls to build dynamic web page content.
The document discusses jQuery and its uses and methods. It introduces jQuery as a way to write JavaScript code that works across browsers. It provides examples of how jQuery can be used to select and manipulate HTML elements using simpler syntax compared to vanilla JavaScript. Key jQuery methods are also summarized, including how to select elements, modify attributes, handle events, add/move elements, and perform animations and AJAX requests.
This document discusses jQuery, a JavaScript library. It defines jQuery as a lightweight library that allows developers to "write less, do more". It describes how jQuery works by selecting elements and running functions on them. It also covers various jQuery methods for DOM manipulation like fading, sliding, and handling events. Key points covered include selecting elements, jQuery syntax, downloading jQuery, and how to get started with basic functionality.
Getting the Most Out of jQuery Widgetsvelveeta_512
The document discusses strategies for building modular widgets in jQuery. It recommends thinking of widgets as small, decoupled components that communicate through events. Components should subscribe to and respond to events from other components, with references only going downward between layers. Each layer consumes events from lower layers and publishes events upward. The document also recommends decorating widget functions to add logging or other functionality.
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.
This document provides an overview of jQuery, a JavaScript library for DOM manipulation. It discusses jQuery's CSS selector syntax, methods for manipulating DOM elements and collections, event handling, AJAX support through methods like load() and get(), and how jQuery is extensible through plugins. The document also provides examples of DOM traversal, value retrieval, event binding, and chaining methods.
This document discusses using jQuery with Ruby on Rails. It covers including jQuery and rails.js in Rails 3 applications, reproducing CSRF meta tags, using remote links, and rendering JavaScript templates. It also discusses making AJAX requests in Rails 2 applications by returning JSON from controllers and binding to jQuery events in rails.js. The document provides an introduction and agenda for a presentation on integrating jQuery into Ruby on Rails applications.
The document summarizes new features and changes to the jQuery event system in version 1.7. Key points include:
- The .on() and .off() methods were introduced to unify event binding, removing confusion from multiple older methods. This improves performance and reduces code size.
- Event delegation was optimized through "quickIs()" to speed up selector matching, improving delegation performance by 2-4x in most browsers.
- Existing event bugs were fixed and the system was overhauled to make events more "hookable" and extensible.
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.
Things you should know about jQuery JavaScript library. A JavaScript library designed to hide painful cross-browser compatibility issues while presenting a solid, usable, API.
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 discusses various jQuery secrets including:
1. Utilities for saving and removing state from DOM elements using jQuery.data() and jQuery.removeData().
2. Hidden events like getData, setData, and changeData that are emitted when data is read, set, or changed on an element.
3. Extending jQuery with custom functions, properties, and AJAX shortcuts.
4. Binding custom events and namespaces, self-defined animation speeds, and extending jQuery plugins.
jQuery is a JavaScript library that simplifies web development and is widely used. It allows developers to select elements, manipulate DOM elements, handle events, and develop animations and AJAX interactions easily. jQuery supports cross-browser functionality and makes tasks like DOM manipulation, event handling, animation, and Ajax easier through its simple and concise API. Developers can implement jQuery either from scratch or by using existing plugins.
The Django Book Chapter 9 - Django Workshop - Taipei.pyTzu-ping Chung
This document provides an overview of template concepts in Django, including template tags, variables, contexts, loading templates, custom processors, and HTML escaping. It demonstrates how to render templates using different approaches like render_to_response and RequestContext, and configure template directories and loaders. Code samples are provided for common template tasks in Django.
jQuery is a popular JavaScript library that makes HTML document traversal and manipulation, event handling, animation, and Ajax interactions more simple. It works across browsers and allows developers to write less code using its easy-to-use API. The document discusses how jQuery works, including how to launch code on document ready, add and remove HTML classes, and use callbacks and functions when passing arguments to other functions.
This document provides an overview of what JavaScript capabilities are available in Plone and how to use them. It discusses nuts and bolts topics like injecting JavaScript and CSS, as well as how to create common interactive elements like validation, popups, tabs, and drag and drop functionality using tools like jQuery. The document is intended as an introduction for Plone developers on getting started with JavaScript in Plone.
This presentation covers some jQuery basics, as well as some general concepts you should understand about jQuery. You will find other tips and tricks sprinkled throughout before the live coding session starts.
The code from the live coding session is available here: https://github.com/dcneiner/jQuery-Bling and covers far more advanced topics than the slide portion of this presentation.
The document discusses the history and evolution of JavaScript libraries for web development. It describes how jQuery has come to dominate the market due to its simplicity and robustness. It outlines Microsoft's initial development of its own Microsoft Ajax library to support ASP.NET developers, but how it later embraced jQuery instead and now includes it with Visual Studio.
This is a recording of the Adobe Connect session done with the Northern Virginia ColdFusion Users Group discussing the open source initiative known as Team CF Advance. If you are a CFML (ColdFusion) developer who would like to learn more about this open source initiative and would like to participate, this is a good introduction to the concepts behind the team and where we are as of January 2014.
Learn more and sign-up to join the team at http://teamcfadvance.org/
learn the in's and out's of developing touch-screen desktop applications using AIR, HTML5, CSS3, jQuery and your favorite back-end technology. Presented at the Northern Virginia ColdFusion Users Group (NVCFUG) in March 2013.
MXUnit is a testing framework for ColdFusion that allows testing of CFC components. It is one tool in a tester's toolkit for test-driven development. MXUnit provides a framework for writing test cases with setup, teardown, and assertion methods. Tests can be run individually or as part of a test suite from a browser.
Denard Springle presented on best practices for ColdFusion code security. The presentation covered topics like obfuscation, encryption, common attack vectors like SQL injection and XSS, secure authentication, and implementing two-factor authentication. Code examples and demos were provided for obfuscating code, encrypting data, preventing attack vectors, and setting up secure and multi-factor authentication flows. Additional resources on security topics and frameworks were also shared.
This document is (one of many) coding style documents available for ColdFusion on the web. This one combines the best practices of several noted ColdFusion developers into a single cohesive coding style guideline document you can implement immediately with excellent results.
This document provides tips for improving the performance of ColdFusion applications, including writing code in an object-oriented style, checking for errors first and planning fast exits, limiting nested loops, knowing which ColdFusion functions to avoid, testing execution speed, using stored procedures, caching pages, queries and ORM data, and flushing caches when needed. Additional resources are provided on optimizing ColdFusion applications and performance tuning servers.
Team Building PowerPoint Slides include topics such as: why teams work, building a team, reasons to create teams, structuring your team, developing effective teams, five intrinsic elements of teams, four stages of team development, team behaviors, team roles, 18 group building behaviors, overcoming common obstacles, responsibilities for team leadership, evaluating team performance, viewing the top teams, how to's and more. Slides can easily be tailored to your specific needs (make handouts, create overheads and use them with an LCD projector) and are available for license. 100+ PowerPoint presentation content slides. Each slide includes slide transitions, clipart and animation. System & Software Requirements: IBM or MAC and PowerPoint 97 or higher. Royalty Free - Use Them Over and Over Again. Once purchased, download instructions will be sent to you via email. (PC and MAC Compatible).
The document provides an overview of the Ministry of Education in Pakistan including its constitution, functions, organizations, departments, and wings. Key points include:
- The Ministry is responsible for developing education policies, plans, curricula, and overseeing federal educational institutions.
- It has several wings that handle functions like policy and planning, projects, training, curriculum development, administration, and monitoring and evaluation.
- Attached departments include the Federal Directorate of Education and Department of Libraries. Autonomous bodies include examination boards and educational foundations.
The document discusses jQuery, a JavaScript library. It provides information on:
- What jQuery is and its main functionality, including DOM scripting, Ajax, user interface effects, and form validation.
- How to get started with jQuery, including downloading the file, adding it to a page via a script tag, and using common selectors like ID, class, and tag name to select elements.
- Common jQuery methods for manipulating elements, like adding and removing classes, traversing the DOM, making GET/POST requests, and loading content via Ajax.
- Ensuring the document is ready before running jQuery code by using the ready function.
So in summary, the document provides an overview
Mobile applications Development - Lecture 12
Javascript
jQuery (Zepto)
useful microframeworks
This presentation has been developed in the context of the Mobile Applications Development course at the Computer Science Department of the University of L’Aquila (Italy).
http://www.di.univaq.it/malavolta
This document provides an overview of jQuery, including what it is, why it's useful, how to get started, and some common jQuery syntax. jQuery is a JavaScript library that makes it much easier to use JavaScript on websites. It simplifies tasks like DOM manipulation, event handling, animation, and Ajax. The document explains how to download jQuery, includes some basic jQuery syntax using selectors and methods, and covers various features like effects, HTML/CSS manipulation, events, traversing, and Ajax.
How to increase Performance of Web Application using JQuerykolkatageeks
Pallab Dutta presented a wonderful session on how to increase productivity of web application using JQuery. He showed us demos regarding basic syntax of JQuery.
Follow us
www.kolkatageeks.com
to get more.
The document discusses jQuery, a JavaScript library that simplifies common tasks like accessing and modifying elements on an HTML page. It covers how jQuery interacts with the DOM and allows selecting elements, modifying styles and content, and handling events. The document also provides examples of how jQuery can be used to make AJAX requests to retrieve and display external data without reloading the page.
A Rich Web Experience with jQuery, Ajax and .NETJames Johnson
The document is a presentation about providing a rich web experience using jQuery, Ajax, and .NET. It discusses JavaScript and jQuery, including jQuery syntax, selectors, chaining, traversing, manipulation, events, effects, and Ajax functionality. It also covers jQuery UI widgets and themes. The last section discusses user experience considerations like validating user input with Ajax calls.
This document contains a summary of jQuery secrets presented by Bastian Feder. It discusses various techniques including saving and removing state from DOM elements using jQuery.data() and jQuery.removeData(), extending jQuery functionality through plugins, and customizing AJAX requests and event handling. The presentation provides code examples for working with jQuery's data storage methods, namespaces, promises/deferreds, global AJAX settings, and extending jQuery.
A Rich Web experience with jQuery, Ajax and .NETJames Johnson
The document provides an overview of using jQuery, Ajax, and .NET to build a rich web experience. It introduces jQuery and its benefits for dynamic interactivity, DOM manipulation, and Ajax functionality. Specific jQuery methods and features are demonstrated, including selecting elements, events, effects, and AJAX calls. User experience best practices are also discussed, such as validating user input using jQuery before form submission.
This document provides an introduction and overview of jQuery. It discusses why jQuery is useful, unobtrusive JavaScript, fundamental jQuery elements and concepts like selectors and the jQuery wrapper. It also covers more advanced topics like query chains, advanced selectors, the document ready handler, extending jQuery, and using jQuery with other libraries. The document is intended to teach the basics of jQuery and how it can be used to select and manipulate elements on an HTML page.
Building iPhone Web Apps using "classic" DominoRob Bontekoe
This document discusses building iPhone web apps using classic Domino. It covers the required structure of a mobile web app including initializing the app and registering event handlers. It demonstrates using embedded views in Domino to manage app pages and includes code examples for communicating with servers via AJAX. References are provided for JavaScript frameworks like jQTouch that can be used to build these types of apps.
The document discusses jQuery API functions related to core functionality, selectors, data access, and attributes. It provides examples and explanations of functions like jQuery(), each(), html(), text(), val(), attr(), and removeAttr(). Key points covered include how jQuery() is used to select elements, how each() iterates over a jQuery object, and how attr(), html(), and text() are used to get/set element attributes and content.
This document summarizes jQuery secrets presented by Bastian Feder. It discusses utilities like jQuery.data() and jQuery.removeData() for saving and removing state on DOM elements. It also covers AJAX settings, events, extending jQuery, and jQuery plugins. The presentation provides code examples for working with data, events, namespaces, AJAX, and extending jQuery functionality.
This document provides an overview of jQuery, including:
- What jQuery is and its main features like event handling, animations, AJAX interactions, and DOM manipulation.
- How to install jQuery and include the jQuery library file in an HTML document.
- Common jQuery syntax using CSS-like selectors to select elements and perform actions.
- Examples of different jQuery selectors like ID, class, and attribute selectors.
- Examples of jQuery methods for manipulating elements like getting/setting values, adding/removing classes.
- How to handle common jQuery events like click, mouseover, and keypress.
- How to retrieve values from a selected table row in jQuery.
Zepto.js, a jQuery-compatible mobile JavaScript framework in 2KThomas Fuchs
The document discusses the goals and design of Zepto.js, a JavaScript framework for mobile web applications. It aims to have a very small codebase that is easy to use, extends native browser APIs, and avoids non-essential browser implementations. It provides a jQuery-like API but takes advantage of mobile features for better performance on small screens and devices with limited bandwidth.
This document compares jQuery and Prototype JavaScript libraries. It provides examples of common tasks like selecting elements, creating elements, handling events, and animations. Key differences are shown such as jQuery using $() and Prototype using $$(). The document also discusses plugins, references, and waiting for the DOM to load.
JQuery provides methods to manipulate DOM in efficient way. You do not need to write big code to modify the value of any element's attribute or to extract HTML code from a paragraph or division.
JQuery provides methods such as .attr(), .html(), and .val() which act as getters, retrieving information from DOM elements for later use.
This document provides an overview of AJAX, JSON, jQuery, and livequery. It discusses how these technologies enable asynchronous communication with servers and manipulation of web pages. It also provides examples of using jQuery to select elements, modify attributes and styles, handle events, and perform animations. The document concludes with assignments for demonstrating skills with jQuery selectors, effects, and calendar functionality.
This document provides an overview of jQuery training presented by Narendra Dabhi. It discusses the basic structure of jQuery, creating and manipulating content, working with CSS, creating custom plugins, using AJAX, and animation. Key topics covered include selecting elements, adding/removing content, getting and setting attributes and styles, and common jQuery effects like hide, slide, and fade.
The document provides information on dynamically accessing and manipulating web pages with JavaScript and jQuery. It discusses getting and setting element values, attributes, styles, sizes and positions. It also covers dynamically adding, removing, replacing and rearranging elements. Specific methods for these manipulations using jQuery are demonstrated through code examples, such as using html(), remove(), replaceWith(), after() and toggleClass(). The document also discusses interacting with the window, browser and screen objects.
This document provides an introduction and overview of jQuery, including:
1) The benefits of jQuery such as its shallow learning curve, ease of DOM manipulation, cross-browser compatibility, and extensibility through plugins.
2) How to get started with jQuery by downloading the library and using basic selectors and functions.
3) Examples of jQuery selectors, actions, and effects that can be used to manipulate and style page elements.
4) Important jQuery concepts like the DOM, CSS selectors, JSON, and using events like "ready" and "click" to execute code.
1. jQuery, CSS3 & ColdFusion Presented at NCDevCon 2011by:DenardSpringle
2. Who Am I?Freelance Software Systems EngineerRich internet and mobile applicationsHardware, network and storage engineeringCMMI process management & assessmentOver 20 years IT experienceOver 10 years ColdFusion experienceHost of the Northern Virginia CFUGdenard.springle@gmail.comhttp://www.nvcfug.org/
3. UI Design – Then and Now(or ‘Why I used to loathe user interface design and what changed my mind!’)Traditional Web DesignCSS3, HTML5 & jQueryPet Peeve #1 – Multiple return trips to graphics applications (aka longer development cycles).Pet Peeve #2 – Multiple images make for slower loading sites.Pet Peeve #3 – Requires multiple designs and complicated Javascript for multi-screen development.Pet Peeve #4 – Interactive elements require multiple images.Virtually eliminates the need for graphics applications beyond composition.Virtually eliminates the need for images.Uses style sheets and media queries to support multi-screen development. jQuery has a Mobile edition.Allows interactive elements to be created and styled with or without images with ease.
4. What is the jQuery library?Javascript RAD frameworkHandles cross-browser dependencies*Uses familiar CSS language selectorsPacked with handy utility functions (like Ajax)Loads of available plugin’s or roll your ownWorks with other Javascript frameworks (including ColdFusion’s built-in functions)Works with native Javascript functionsWorks with (most) emerging standards (CSS3, HTML5)* Some plugin’s have cross-browser issues because they employ Javascript functions that are browser specific, or rely on deprecated jQuery 1.3 functions.
5. Implementing the jQuery libraryDownload from http://docs.jquery.com/Downloading_jQueryDownload with jQuery UI themeroller<script src=‘jquery-1.x.x[.min].js’ type=‘text/javascript’>Google CDN @ <script src=‘http(s)://ajax.googleapis.com/ajax/libs/jquery/1.x.x/jquery.min.js’ type=‘text/javascript’>MSDN CDN @ <script src=‘http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.x.x.min.js’ type=‘text/javascript’>jQuery CDN @ <script src=‘http://code.jquery.com/jquery-1.x.x.min.js’ type=‘text/javascript’>
6. Implementing the jQuery libraryjQuery(document).ready(function() { … code here …});$(funtion() { … code here …});$ == alias for ‘jQuery’
7. jQuery Selectors – The Basics<div id=“myDiv” class=“myClass”></div>$(‘#myDiv’) – selects the element identified by the ‘myDiv’ id$(‘.myClass’) – selects any element assigned the ‘myClass’ class$(‘div’) –selects all <div> elements in the page
8. jQuery Selectors – CSS Syntax<div id=“myDiv” class=“myClass”> <p>Hello <span id=“world” class=“red”>World</span>!</p></div>$(‘p’) – selects all paragraph elements in the page$(‘#myDiv p’) – selects all paragraph elements within the element with the ‘myDiv’ id$(‘.myClass p’) – selects all paragraph elements within the elements assigned the ‘myClass’ class.$(‘p#world’) – selects the element within any paragraph element with the ‘world’ id.
9. jQuery Selectors – CSS Operators<div id=“myDiv” class=“myClass”> <p>Hello <span id=“world” class=“red”>World</span>!</p></div>$(‘#myDiv p span.red’) – selects all <span> elements assigned the ‘red’ class within a paragraph element that is within the element with the ‘myDiv’ id.$(‘#myDiv > p’) – selects all paragraph elements that are direct children of the element with the ‘myDiv’ id.$(‘#myDiv + p’) – selects the paragraph element that is immediately preceded by the element with the ‘myDiv’ id
10. jQuery Selectors - CSS Filters<div id=“myDiv” class=“myClass”> <p>Hello <span id=“world” class=“red”>World</span>!</p> <p>Welcome to our website. We hope you like it!</p></div>$(‘#myDiv p:first’) – selects the first paragraph element that is within the element with the ‘myDiv’ id.$(‘#myDiv p:last’) – selects the last paragraph element that is within the element with the ‘myDiv’ id.$(‘p:even’) – selects all even paragraph elements in the page
12. Working with Element Propertiesattr(name) – obtains the value assigned to the specified attribute for the first element in the matched set.attr(name,value) – sets the named attribute to the passed value for all elements in the matched set.attr(attributes) – uses a JSON object to set corresponding attributes onto all elements of the matched set.
13. Working with Element Properties<imgsrc=“myImage.gif” id=“myImage” alt=“” title=“Voila!” /><imgsrc=“” id=“newImage” alt=“” title=“” />alert($(‘#myImage’).attr(‘title’));$(‘#newImage’).attr(‘src’,$(‘#myImage’).attr(‘src’));$(‘#myImage’).attr(‘alt’,’alternate image text’);$(‘#myImage’).attr({title: ’Bang!’, alt: ‘alternate image text’});$(‘#newImage’).attr(‘alt’,$(‘#myImage’).attr(‘title’));
14. Changing Style with jQueryhasClass(name) – returns true if any element of the matched set possesses the passed class name.addClass(names) – specifies the name, or names, of classes to add to the matched set.removeClass(names) – specifies the name, or names, of classes to remove from the matched set.toggleClass(names) – specifies the name, or names, of classes that should be removed if they are present, or added if they are not present in the matched set
15. Changing Style with jQuerycss(name) – reads the value of the CSS property for the first element in the matched setcss(name,value) – sets the value of the named css property for each element in the matched setcss(properties) – sets the values using a JSON object for each element in the matched setwidth(), width(value) – reads the width of the first element or sets the width of all elements in the matched setheight(), height(value) – reads the height of the first element or sets the height of all elements in the matched set
16. Setting Element Content w/ jQueryhtml() – obtains the HTML content of the first element in the matched sethtml(content) – sets the passed HTML fragment as the content of all elements in the matched settext() – concatenates and returns all text content of the matched set text(content) – sets the text content of all elements in the matched set
17. jQuery Eventsbind() – bind an event handler to all elements in a matched setunbind() – removes an event handler from all elements in a matched setAll javascript events (mouseover, mouseout, mousedown, focus, blur, select, submit, etc.)
19. jQuery Events – Specific Event Binding<button id=‘myButton’ />click() – bind a click event handler to an element$(‘#myButton’).click(function() {window.location.href = ‘clickedPage.cfm’;});dblclick() – bind a double-click handler to an element$(‘#myButton’).dblclick(function() { $(this).width(300).height(100);});
20. jQuery Events – Binding non-existent elementslive() – bind an event handler to a matched set that does not (yet) exist in the dom$(‘#myButton’).live(‘mousedown’,function() {window.location.href = ‘clickedPage.cfm’;});die() – unbinds an event handler bound with liveUse sparingly. Resource hog. Has to re-read the dom for every change in the dom
21. jQuery AJAX Function$.ajax({options})Provides complete control over the entire AJAX process including specifying data sources, data type, event handlers, context, filters, etc. etc.All other Ajax functions are a subset of the $.ajax() function.Requires JSON and callback handler
22. jQuery AJAX Methodsload() – loads HTML content into the wrapped set. Callback function is optional$.get() – makes HTTP GET requests and requires a callback function$.getJSON – makes HTTP GET requests with a defined return data type of JSON, requires a callback function
23. jQuery AJAX Methods$.post() – makes HTTP POSTs and requires a callback function$.ajax(), $.get() and $.post() response types:xml – passes XML dom to the callback functionhtml – passes unprocessed HTML to the callback. <script> is evaluated.json– interpreted as JSON string, passed as object to the callbackjsonp – same as json, but allows remote scriptingscript – processed as javascript and passed to the callbacktext – plain text passed to the callback
24. Single API in jQuery – jQuery Side$.ajaxSetup({options});Accepts the same options as $.ajax()Set default options for all future $.ajax() calls (does not apply to $.get(), $.getJSON(), or $.post() as of v1.6.3). Defaults can still be overridden in subsequent individual $.ajax() calls.Specifying a default (single) url for all future requests using the $.ajaxSetup() method allows for single-api applicationsdemo
26. Single API in jQuery – CF Side<!--- params--><cfparamname="URL.app" default="hello_world" /><!--- switch on the supplied URL.app value ---><cfswitch expression="#URL.app#"> <!--- Hello World App ---><cfcase value="hello_world"> <div class="content-text">Hello World! This content is derived from an AJAX request to the ColdFusion back-end!</div></cfcase><!--- Photo Viewer App ---><cfcase value="photo_viewer"> <div class="content-text">The photo viewer is still a work in progress....<br /> <br />Please check back later.</div></cfcase><!--- ERROR ---><cfdefaultcase> <div class="content-text">ERROR!</div></cfdefaultcase></cfswitch>
27. jQuery PluginsPlugins are encapsulated functions within the jQuery scope that participate in chaining.Thousands of available plugins, both official and unofficial, and about as many blogs on how to write jQuery functionality and pluginshttp://plugins.jquery.com/ or Google searchAbout 13,400,000 results for ‘jQuery plugins’ on Google
28. jQuery Plugins – jQuery UIjQuery UI is now a sub-project of jQuery, but was originally a loose collection of plugins. Now it’s an integrated collection of plugins with a unified purpose and goal.Makes creating interactive UI painless, quick to develop and quick to execute.Widgets include: Tabs, Accordions, Buttons and Buttonsets, Sliders, Progress Bars, Autocompleters, Datepickers and Dialog Boxes… so farTooltip, Menu, Menubar, Popup and Spinner are forthcoming
29. jQuery UI - Themerollerhttp://jqueryui.com/themeroller/Allows you to quickly and easily generate .css and download jQuery and jQuery UI to theme the components generated by jQuery UIProvides an easy way to scope css for specific regions of the siteUtilizes CSS3 for some of its effects (rounded corners) and transparent PNGs (not supported in IE6)
31. jQuery UI – Drag and Drop +Draggable() and Droppable() – allows you to assign matched sets that can be dragged and matched sets which can be dropped ontoSortable() – allows you to assign a matched set that can be user sorted (with drag & drop)Resizable() – allows you to assign a matched set that can be resized by dragging one or more cornersSelectable() – allows you to assign a matched set that can be selected by clicking on the element
32. jQuery UI – Effects & AnimationsEffect() – applies one of the jQuery UI animated effects to a matched setAnimate() – animates numerical css properties of a matched setHide() – hides a matched set using one of the jQuery UI animated effects Show() – shows a matched set using one of the jQuery UI animated effects
35. CSS3 – Changes since CSS2Media QueriesRounded, multi-color and image bordersGradient, multiple image, resizable backgroundsText shadows, text overflow and word wrapDrop shadow, resizable, outline offset boxesColor opacity (RGBA) and HSL color values2D & 3D Transformations (skew, rotate, etc.)*Transitions (dynamic style)*, Web Fonts*Flexible grid/column layout** = Work in Progressdemo
36. IE CSS3 & HTML5 SupportIE ~ 8 – Zero support for CSS3, HTML5, dom event model 2IE 9 – Limited support for CSS3, HTML5 and dom event model 2IE 10 – ‘Final’ browser to be released by M$. Claims will support full CSS3, HTML5 and dom event model 2 *at time of release*HTML5 tags can be used in IE < 9 with the help of a Javascript shiv
37. Progressive EnhancementsDesign for IE firstAdd enhanced styles for modern browsers (Chrome, Firefox, etc.) secondProvide alternate styles for non-supported CSS3 features in IE (e.g. solid background color in contrast to gradient background)Functionality should be the same for all browsers
38. Augment jQuery UI with CSS3Redefine opacity, gradient backgrounds, text and box drop-shadows, transformations and more of your existing jQuery UI .css (via override)Create hybrid elements using a combination of jQuery elements and your own CSS styling (e.g. icons & buttons from jQuery w/ your own drop shadow boxes and text)demo
39. Additional ResourcesBook: jQuery in Action (link to Amazon)Book: CSS3 Visual Quickstart Guide (link to Amazon)NVCFUG Demo Site (link to demo site)jQuery (link) and jQuery UI (link) websitesdenard.springle@gmail.com