Suche senden
Hochladen
JavascriptMVC
•
Als ODP, PDF herunterladen
•
1 gefällt mir
•
1,067 views
4
4lb0
Folgen
TechTalk de JavaScriptMVC
Weniger lesen
Mehr lesen
Technologie
Melden
Teilen
Melden
Teilen
1 von 16
Jetzt herunterladen
Empfohlen
jQuery - Javascript para quem não sabe Javascript
jQuery - Javascript para quem não sabe Javascript
Nando Vieira
Banner kiri kanan1
Banner kiri kanan1
Afrianto Budi
Jquery ui, ajax
Jquery ui, ajax
Ricardo Cavalcanti
Curso Symfony - Clase 1
Curso Symfony - Clase 1
Javier Eguiluz
JavaScript de qualidade: hoje, amanhã e sempre!
JavaScript de qualidade: hoje, amanhã e sempre!
Thiago de Oliveira Pires
J query aula01
J query aula01
Suissa
jQuery for beginners
jQuery for beginners
Arulmurugan Rajaraman
Introducción a Bolt
Introducción a Bolt
Asier Marqués
Empfohlen
jQuery - Javascript para quem não sabe Javascript
jQuery - Javascript para quem não sabe Javascript
Nando Vieira
Banner kiri kanan1
Banner kiri kanan1
Afrianto Budi
Jquery ui, ajax
Jquery ui, ajax
Ricardo Cavalcanti
Curso Symfony - Clase 1
Curso Symfony - Clase 1
Javier Eguiluz
JavaScript de qualidade: hoje, amanhã e sempre!
JavaScript de qualidade: hoje, amanhã e sempre!
Thiago de Oliveira Pires
J query aula01
J query aula01
Suissa
jQuery for beginners
jQuery for beginners
Arulmurugan Rajaraman
Introducción a Bolt
Introducción a Bolt
Asier Marqués
Back To The Front - Javascript Test Driven Development is between us (workshop)
Back To The Front - Javascript Test Driven Development is between us (workshop)
Marco Cedaro
An introduction to Ember framework
An introduction to Ember framework
Diana Falkowska
Crea un tema compatibile con le ultime novità WordPress
Crea un tema compatibile con le ultime novità WordPress
SkillsAndMore
Angular 2 не так уж и плох... А если задуматься, то и просто хорош / Алексей ...
Angular 2 не так уж и плох... А если задуматься, то и просто хорош / Алексей ...
Ontico
Peek inside the fantastical Ukrainian Village home and studio of artists Jare...
Peek inside the fantastical Ukrainian Village home and studio of artists Jare...
irwinvifxcfesre
Prototype UI
Prototype UI
Sébastien Gruhier
Animação com jQuery
Animação com jQuery
douglasgrava
噗浪最近有點胖
噗浪最近有點胖
Irvin Chen
Twig, los mejores trucos y técnicas avanzadas
Twig, los mejores trucos y técnicas avanzadas
Javier Eguiluz
jQuery Plugins Intro
jQuery Plugins Intro
Casey West
Introduction à Marionette
Introduction à Marionette
Raphaël Lemaire
Angular 2のRenderer
Angular 2のRenderer
Yosuke Onoue
WordPress Customizer
WordPress Customizer
slicejack
JQuery应用开发
JQuery应用开发
chevionlu
Templating WordPress
Templating WordPress
Konstantin Kovshenin
UISearchController par Stéphane sudre
UISearchController par Stéphane sudre
CocoaHeads France
JSF 2 and Ajax
JSF 2 and Ajax
Jim Driscoll
Jquery Framework
Jquery Framework
Luiz Carlos Chaves
Chief Keef's hologram can't catch a break, and it's a win for Keef
Chief Keef's hologram can't catch a break, and it's a win for Keef
chicagonewsonlineradio
Web App Mvc
Web App Mvc
Will Gunn
Le pic de Hubert
Le pic de Hubert
acrespel
X efficiency of commercial banks in kenya
X efficiency of commercial banks in kenya
Alexander Decker
Weitere ähnliche Inhalte
Was ist angesagt?
Back To The Front - Javascript Test Driven Development is between us (workshop)
Back To The Front - Javascript Test Driven Development is between us (workshop)
Marco Cedaro
An introduction to Ember framework
An introduction to Ember framework
Diana Falkowska
Crea un tema compatibile con le ultime novità WordPress
Crea un tema compatibile con le ultime novità WordPress
SkillsAndMore
Angular 2 не так уж и плох... А если задуматься, то и просто хорош / Алексей ...
Angular 2 не так уж и плох... А если задуматься, то и просто хорош / Алексей ...
Ontico
Peek inside the fantastical Ukrainian Village home and studio of artists Jare...
Peek inside the fantastical Ukrainian Village home and studio of artists Jare...
irwinvifxcfesre
Prototype UI
Prototype UI
Sébastien Gruhier
Animação com jQuery
Animação com jQuery
douglasgrava
噗浪最近有點胖
噗浪最近有點胖
Irvin Chen
Twig, los mejores trucos y técnicas avanzadas
Twig, los mejores trucos y técnicas avanzadas
Javier Eguiluz
jQuery Plugins Intro
jQuery Plugins Intro
Casey West
Introduction à Marionette
Introduction à Marionette
Raphaël Lemaire
Angular 2のRenderer
Angular 2のRenderer
Yosuke Onoue
WordPress Customizer
WordPress Customizer
slicejack
JQuery应用开发
JQuery应用开发
chevionlu
Templating WordPress
Templating WordPress
Konstantin Kovshenin
UISearchController par Stéphane sudre
UISearchController par Stéphane sudre
CocoaHeads France
JSF 2 and Ajax
JSF 2 and Ajax
Jim Driscoll
Jquery Framework
Jquery Framework
Luiz Carlos Chaves
Chief Keef's hologram can't catch a break, and it's a win for Keef
Chief Keef's hologram can't catch a break, and it's a win for Keef
chicagonewsonlineradio
Web App Mvc
Web App Mvc
Will Gunn
Was ist angesagt?
(20)
Back To The Front - Javascript Test Driven Development is between us (workshop)
Back To The Front - Javascript Test Driven Development is between us (workshop)
An introduction to Ember framework
An introduction to Ember framework
Crea un tema compatibile con le ultime novità WordPress
Crea un tema compatibile con le ultime novità WordPress
Angular 2 не так уж и плох... А если задуматься, то и просто хорош / Алексей ...
Angular 2 не так уж и плох... А если задуматься, то и просто хорош / Алексей ...
Peek inside the fantastical Ukrainian Village home and studio of artists Jare...
Peek inside the fantastical Ukrainian Village home and studio of artists Jare...
Prototype UI
Prototype UI
Animação com jQuery
Animação com jQuery
噗浪最近有點胖
噗浪最近有點胖
Twig, los mejores trucos y técnicas avanzadas
Twig, los mejores trucos y técnicas avanzadas
jQuery Plugins Intro
jQuery Plugins Intro
Introduction à Marionette
Introduction à Marionette
Angular 2のRenderer
Angular 2のRenderer
WordPress Customizer
WordPress Customizer
JQuery应用开发
JQuery应用开发
Templating WordPress
Templating WordPress
UISearchController par Stéphane sudre
UISearchController par Stéphane sudre
JSF 2 and Ajax
JSF 2 and Ajax
Jquery Framework
Jquery Framework
Chief Keef's hologram can't catch a break, and it's a win for Keef
Chief Keef's hologram can't catch a break, and it's a win for Keef
Web App Mvc
Web App Mvc
Andere mochten auch
Le pic de Hubert
Le pic de Hubert
acrespel
X efficiency of commercial banks in kenya
X efficiency of commercial banks in kenya
Alexander Decker
Marketing Segmentation
Marketing Segmentation
Karthik Shakthi
Vero
Vero
Refuerzo
Analytics services 2013
Analytics services 2013
Afsar Ali
Zakah
Zakah
16dnh
Introduction of gastrointestinal tract
Introduction of gastrointestinal tract
Rajesh Goit
Introduction to computer graphics
Introduction to computer graphics
Amandeep Kaur
Andere mochten auch
(8)
Le pic de Hubert
Le pic de Hubert
X efficiency of commercial banks in kenya
X efficiency of commercial banks in kenya
Marketing Segmentation
Marketing Segmentation
Vero
Vero
Analytics services 2013
Analytics services 2013
Zakah
Zakah
Introduction of gastrointestinal tract
Introduction of gastrointestinal tract
Introduction to computer graphics
Introduction to computer graphics
JavascriptMVC
1.
2.
3.
document.getElementById("box").style.display = "block";
4.
5.
$(”box”).attr(”display ”, ”block”);
6.
$(”box”).show();
7.
8.
9.
{
10.
init: function (el)
{
11.
12.
13.
14.
15.
Una aplicación donde
buscas imagenes en Flickr y las agregas a tu galería donde podes acomodarlas.
16.
Vamos a ver
como hacemos lo mismo con y sin JavaScriptMVC
17.
(sin framework pero
con JQuery, tampoco tengo tanto tiempo libre che!)
18.
19.
JavaScriptMVC $( function
() { // load $.get( "/server/get.php" , function (images) { for ( var i = 0; i < images.length; i++) { addImageToGallery(images[i]); } }, "json" ); }); function addImageToGallery(data) { var link, img, li; link = $( "<a></a>" ).attr( "href" , data.src.replace( /_m/ , "." )); img = data; img.alt = img.title; img.src = data.src.replace( /_m/ , "_s." ); li = $( "<li></li>" ).attr( "id" , "image_item_" + data.id); delete img.id; link.append($( "<img />" ).attr(img)); link.lightBox({eventType: "dblclick" }); li.append(link); $( "#gallery" ).append(li); }
20.
JavaScriptMVC
21.
22.
23.
24.
JavaScriptMVC $( "#search
form" ).submit( function (event) { event.preventDefault(); flickrSearch($( this .q).val(), function (items) { var html = "<ul>" ; var item; for ( var i = 0; i < items.length; i++) { item = items[i]; html += "<li title=amp;quot;Click to addamp;quot;><img src='" + item.media.m + "' />" ; html += "<p>" + item.title + "</p></li>" ; } html += "</ul>" ; $( "#search_results" ).html(html); $( "#search_results" ).show(); }); return false ; }); $( "#toggle_results" ).click( function () { $( "#search_results" ).toggle(); }); $( "#search_results li" ).live( "click" , function () { var o = { src: $( "img" , this ).attr( "src" ), title: $( "p" , this ).html() }; $.post( "/server/save.php" , o, function (response) { addImageToGallery(response); }, "json" ); $( "#search_results" ).hide(); });
25.
JavaScriptMVC jQuery.Controller.extend( 'SearchController'
, {}, { "form submit" : function (el, ev) { ev.preventDefault(); Flickr.search( this .element.find( "input" ).val(), this .callback( "showResults" )); }, showResults: function (results) { var html = this .view( "results" , {results: results}); $( "#search_results" ).html(html).show(); }, "#toggle_results a click" : function (el, ev) { $( "#search_results" ).toggle(); ev.preventDefault(); }, "#search_results li click" : function (el) { var image = new ImageItem({ src: $( "img" , el).attr( "src" ), title: $( "p" , el).html() }); image.save( function (imageModel) { $( "#gallery" ).controller().addImage(imageModel); }); $( "#search_results" ).hide(); } });
26.
27.
Jetzt herunterladen