Subject Tool Remarks What is JQuery. Slide Javascript Library



Similar documents
JAVASCRIPT, TESTING, AND DRUPAL

jquery Tutorial for Beginners: Nothing But the Goods

FormAPI, AJAX and Node.js

CMSC434 TUTORIAL #3 HTML CSS JavaScript Jquery Ajax + Google AppEngine Mobile WebApp HTML5

Using jquery and CSS to Gain Easy Wins in CiviCRM

WEB DEVELOPMENT COURSE (PHP/ MYSQL)

Chapter 1. Introduction to web development

The purpose of jquery is to make it much easier to use JavaScript on your website.

Introduction to web development and JavaScript

How To Change Your Site On Drupal Cloud On A Pcode On A Microsoft Powerstone On A Macbook Or Ipad (For Free) On A Freebie (For A Free Download) On An Ipad Or Ipa (For

User Guide for Smart Former Gold (v. 1.0) by IToris Inc. team

Links Getting Started with Widgets, Gadgets and Mobile Apps

jquery Sliding Image Gallery

Dashboard Skin Tutorial. For ETS2 HTML5 Mobile Dashboard v3.0.2

DIPLOMA IN WEBDEVELOPMENT

Citrix StoreFront. Customizing the Receiver for Web User Interface Citrix. All rights reserved.

OPENTABLE GROUP SEARCH MODULE GETTING STARTED ADD RESERVATIONS TO YOUR WEBSITE

Responsive Web Design for Drupal

Example. Represent this as XML

Certified PHP/MySQL Web Developer Course

Chapter 2: Interactive Web Applications

PLAYER DEVELOPER GUIDE

CLASSROOM WEB DESIGNING COURSE

Intro to jquery. Web Systems 02/17/2012

HAML und SASS. (und COMPASS) markup haiku vs. syntactically awesome stylesheets. Tobias Adam, Jan Krutisch mindmatters GmbH & Co.

Modern Web Development:

Creating an newsletter using SimpleNews and phplist

Web Development with R

BT BACKGROUND SLIDESHOW JOOMLA EXTENSION User guide Version 2.0

Sizmek Formats. IAB Mobile Pull. Build Guide

Debugging JavaScript and CSS Using Firebug. Harman Goei CSCI 571 1/27/13

What about MongoDB? can req.body.input 0; var date = new Date(); do {curdate = new Date();} while(curdate-date<10000)

Chapter 1 Introduction to web development and PHP

How To Customize A Forum On Vanilla Forum On A Pcode (Forum) On A Windows (For Forum) On An Html5 (Forums) On Pcode Or Windows 7 (Forforums) On Your Pc

Responsive HTML and Drupal

Web Development CSE2WD Final Examination June (a) Which organisation is primarily responsible for HTML, CSS and DOM standards?

Responsive Web Design: Media Types/Media Queries/Fluid Images

WebIOPi. Installation Walk-through Macros

Web application Architecture

Facebook Twitter YouTube Google Plus Website . o Zooming and Panning. Panel. 3D commands. o Working with Canvas

Tutorial: Building a Dojo Application using IBM Rational Application Developer Loan Payment Calculator

Rich-Internet Anwendungen auf Basis von ColdFusion und Ajax

IBM Script Portlet for WebSphere Portal Release 1.1

Creating a Drupal 8 theme from scratch

C:\Users\Micha\Documents\drupal 7 module\improved_multi_select-7.x-2.x-dev.tar\improved_multi_select-7.x-2.x-dev\improved_multi_sel

Overview. In the beginning. Issues with Client Side Scripting What is JavaScript? Syntax and the Document Object Model Moving forward with JavaScript

MASTERTAG DEVELOPER GUIDE

JTouch Mobile Extension for Joomla! User Guide

Improving Magento Front-End Performance

^/ CS> KRIS. JAMSA, PhD, MBA. y» A- JONES & BARTLETT LEARNING

Create interactive web graphics out of your SAS or R datasets

Up and Running with LabVIEW Web Services

WP Popup Magic User Guide

HTML Form Widgets. Review: HTML Forms. Review: CGI Programs

Qualtrics Question API

Unlocking the Java EE Platform with HTML 5

ios App Development Using Cordova

HP LoadRunner. Software Version: Ajax TruClient Tips & Tricks

Developer Tutorial Version 1. 0 February 2015

( François Agneray. Octobre 2012

SAHARA DIGITAL8 RESPONSIVE MAGENTO THEME

WRITE BETTER HTML BY WRITING BETTER CSS

Drupal and ArcGIS Yes, it can be done. Frank McLean Developer

A set-up guide and general information to help you get the most out of your new theme.

Agenda. 1. ZAPms Konzept. 2. Benutzer-Kontroller. 3. Laout-Aufbau. 4. Template-Aufbau. 6. Konfiguration. 7. Module.

Mobile Web Design with HTML5, CSS3, JavaScript and JQuery Mobile Training BSP-2256 Length: 5 days Price: $ 2,895.00

Skills for Employment Investment Project (SEIP)

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

Lecture 9 Chrome Extensions

SPELL Tabs Evaluation Version

Web Development 1 A4 Project Description Web Architecture

GUI and Web Programming

<Insert Picture Here>

Differences between HTML and HTML 5

PROPOSED SOLUTIONS FOR THE DESIGN & DEVELOPMENT OF COUPON WEBSITE

BT CONTENT SHOWCASE. JOOMLA EXTENSION User guide Version 2.1. Copyright 2013 Bowthemes Inc.

Web-based IDE for Interfacing View Controller

Visualizing a Neo4j Graph Database with KeyLines

AJAX SSL- Wizard Reference

How-To: Submitting PDF forms to SharePoint from custom websites

This document will describe how you can create your own, fully responsive. drag and drop template to use in the creator.

WEB DESIGN COURSE CONTENT

Visualizing an OrientDB Graph Database with KeyLines

Responsive Web Design Creative License

Google Web Toolkit. Progetto di Applicazioni Software a.a. 2011/12. Massimo Mecella

Transcription:

Subject Tool Remarks What is JQuery Slide Javascript Library Picture John Resig Tool for Searching the DOM (Document Object Model) Created by John Resig Superstar Very Small (12k) Browser Independent Not Drupal Bound Examples of Effects - Lullabot Search Box Sites (wenn Internet Verbindung da) - Sagapix Bilder wechseln - Brandnew Referenzen - Stielundco automatisch - Drupal selbst, Menueinstellungen - JqueryUI Examples in D7 What do we need - The library - Firebug Lets Play - Hide, show, fade, toggle Datei jquery.js Firebug Demo - Konsole/HTML/Debug Localhost/JQuery/Start Jquery.com für Referenz <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <script type = "text/javascript" src="jquery.js"></script> </head> <body> <div id= piclist > <div id="pic1" class="pict"> <img src="pic1.jpg" width="200"/> <div id="pic2" class="pict"> <img src="pic3.jpg" width="200"/> <div id="pic3" class="pict"> <img src="pic5.jpg" width="200"/> </body> </html>

2 Methods Konsole - Change CSS Properties - Change DOM CSS File $("#pic1 img").animate({"height": "700px"); $("#pic1 img").animate({"height": "500px","width" : "700px",2000); <link rel="stylesheet" type="text/css" href="start.css"> $("#pic1").addclass('frame'); $("#pic1 img").attr('src','pic9.jpg'); Siehe nettuts.com Activate Do with class and image $('.pict img').hover(function(){ $(this).toggleclass('frame');,function(){ $(this).toggleclass('frame'); ); Add a Button $("#pic3").after('<button id="mybutton">click here</button>'); $('#mybutton').click(function() {$('#pic3').toggle(1000)); Add my own JS File Start.js $(document).ready(function(){ alert('hello Munich); ); Add Button and Click $("#pic3").after('<button id="mybutton">click here</button>'); $('#mybutton').click(function() { $('.pict').toggle(1000); ); Change the Text in the Button 8-tung: vor toggle!!! if($('#pic3').is(':hidden')){ $('#mybutton ').attr('textcontent','hide'); else{ $('#mybutton ').attr('textcontent','show');

Synchronize! Change Source -> wrong! Change Source -> right! Cycle Library Enlarge and make them cycle Cycle.js $('#pic1').hide(); $('#pic2').hide(); $('#pic3 img').animate({"height": "500px","width" : "700px"); $("#pic3").after('<button id="mybutton">click here</button>'); $('#mybutton').click(function() { $('#pic3').fadeout(100); $('#pic3 img').attr('src','pic9.jpg'); $('#pic3').fadein(1000); ); $('#mybutton').click(function() { $('#pic3').fadeout(1000,function(){ $('#pic3 img').attr('src','pic9.jpg'); $('#pic3').fadein(1000); ); ); <script type = "text/javascript" src="cycle.js"></script> $('#piclist').cycle('fade'); Move them manually Add <a href= # ></a> $('#piclist').cycle({ fx: 'turndown', next: '#forward', timeout: 0 ); Sortable Jqueryui.js $(function() { $("#piclist").sortable(); ); Resizable Jqueryui.js Pic2 und 3 löschen #pic1 { border: solid red 2px; width: 200px; $("#pic1").resizable({ stop: function(event, ui) { widthstr=this.clientwidth.tostring()+"px"; heightstr=this.clientheight.tostring()+"px"; $("#pic1 img").animate({"width": widthstr, "height": heightstr); );

Drupal How to add js files 1) Inline on Page 2) One file for all http://localhost/jquery/drupal PHP Filter on page scripts[]=jqdemo.js in garland.info <?php drupal_add_js(' $(document).ready(function(){ alert("drupal Seite ist geladen"); )','inline');?> Drupal.behaviors.start = function(context){ $('h2').hide(3000); 3) Load in a module (or node_api) Module jqdemo <?php function jqdemo_menu(){ $items['jquery'] = array( 'page callback' => jqdemo _jquery', 'access callback' => TRUE, 'type' => MENU_CALLBACK, ); return $items; function jqdemo _jquery(){ drupal_add_js(drupal_get_path('module', jqdemo). '/ jqdemo _module.js'); $pic1=theme('imagecache', 'small_pic', 'sites/default/files/pic7.jpg'); $pic2=theme('imagecache', 'small_pic', 'sites/default/files/pic8.jpg'); $pic3=theme('imagecache', 'small_pic', 'sites/default/files/pic10.png'); $page_contents=' <div id="piclist"> <div id="pic1" class="pict">'. $pic1. ' <div id="pic2" class="pict">'. $pic2. ' <div id="pic3" class="pict">'. $pic3. '

return $page_contents; jqdemo _module.js Drupal.behaviors.start = function(context){ $('.imagecache-small_pic').hover(function(){ $(this).animate({"width":"600");,function(){ $(this).animate({"width":"150"); ); Evtl Demo D7 Ajax Extend Module Seite mit 3 Titeln function jqdemo _ajax_ask(){ drupal_add_css(drupal_get_path('module', jqdemo). '/ jqdemo.css'); drupal_add_js(drupal_get_path('module', jqdemo). '/ jqdemo _ajax.js'); $page_contents= '<div>choose a picture to be loaded'; $result = db_query('select * FROM {node where type="pictures"'); while($data = db_fetch_object($result)){ $the_node= node_load($data->nid); $page_contents.= '<a href = "#"><div class="clickable"><p>'. $the_node- >title. '</p><img src=""/></a>'; return $page_contents; Prepare Click and Call function jqdemo _ajax.js Drupal.behaviors.ajax_ask = function(context){ $('.clickable').click(function(context){get_data(context)); function get_data(context) { //JSon Call var callname='ajax_answer/'+context.currenttarget.textcontent; $.ajax({ type: 'POST',

url: callname, datatype: 'json', success: function(datareturned){ context.currenttarget.firstchild.nextsibling.src=datareturned; Prepare Answer context.currenttarget.firstchild.nextsibling.width= 300;, data: 'js=1' ); function jqdemo _ajax_answer($title=''){ $page_contents='nothing'; $sql='select node.nid AS nid FROM node INNER JOIN content_type_pictures ON node.nid = content_type_pictures.nid where node.title="'. $title. '"'; $result = db_query($sql); while($data = db_fetch_object($result)){ $node= node_load($data->nid); $page_contents = $node->field_one_pic[0][filepath]; if (!empty($_post['js'])) { drupal_json($page_contents); exit(); return $page_contents;