• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Javascript moderno
 

Javascript moderno

on

  • 1,932 views

Palestra sobre Javascript Moderno dada no WOB2012

Palestra sobre Javascript Moderno dada no WOB2012

Statistics

Views

Total Views
1,932
Views on SlideShare
1,911
Embed Views
21

Actions

Likes
5
Downloads
14
Comments
4

7 Embeds 21

http://pinterest.com 13
http://www.twylah.com 3
https://twitter.com 1
https://si0.twimg.com 1
http://fr.twitter.com 1
http://www.linkedin.com 1
http://www.pinterest.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

14 of 4 previous next Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Javascript moderno Javascript moderno Presentation Transcript

    • Javascript ModernoJean Carlo Nascimento aka Suissa
    • Links nosqlbr.com.br jquerybrasil.org frontendbrasil.com.br javascriptbrasil.com.br comoprogramarphp.com.br github.com/suissa about.me/suissa @osuissa
    • Breve História do Javascript
    • "JS had to look like Java only less so, beJava’s dumb kid brother or boy-hostagesidekick. Plus, I had to be done in tendays or something worse than JS wouldhave happened". Brendan Eich
    • LiveScript
    • Como selecionar um elemento?
    • jQuery$(#container);
    • Javascript Modernovar container = document.querySelector(#container);
    • Javascript Velhovar container = document.getElementById(container);
    • Como procurar lis?
    • jQuery$(#container).find(li);
    • Javascript Modernovar lis = document.querySelectorAll(#container li);
    • Javascript Velhovar lis = document .getElementById(container) .getElementsByTagName(li);
    • Trabalhando com classes
    • jQuery$(#box).addClass(wrap);$(#box).removeClass(wrap);$(#box).toggleClass(wrap);
    • Javascript Modernovar container = document.querySelector(#box);container.classList.add(wrap);container.classList.remove(wrap);container.classList.toggle(wrap);
    • Javascript Velhovar box = document.getElementById(box),hasClass = function (el, cl) { var regex = new RegExp((?:s|^) + cl + (?:s|$)); return !!el.className.match(regex);},addClass = function (el, cl) { el.className += + cl;},removeClass = function (el, cl) { var regex = new RegExp((?:s|^) + cl + (?:s|$)); el.className = el.className.replace(regex, );},toggleClass = function (el, cl) { hasClass(el, cl) ? removeClass(el, cl) : addClass(el, cl);};addClass(box, wrap);removeClass(box, wrap);toggleClass(box, wrap);
    • HTML5
    • Node.js
    • Node.js