Skip to content

Instantly share code, notes, and snippets.

@metavida
Forked from anonymous/zoom_tweet.js
Last active December 29, 2015 06:29
Show Gist options
  • Save metavida/7628910 to your computer and use it in GitHub Desktop.
Save metavida/7628910 to your computer and use it in GitHub Desktop.
A WIP, 5 minute intro to programming (via JavaScript)
document.getElementById('content-main-heading')
document.getElementById('content-main-heading').style.zoom //=> "1"
document.getElementById('content-main-heading').style.zoom = 2
document.getElementById('content-main-heading').style.zoom //=> "2"
var myZoomyTitle = document.getElementById('content-main-heading')
myZoomyTitle.style.zoom //=> "2"
myZoomyTitle.style.zoom = 1
jQuery(myZoomyTitle).animate({zoom: 2})
$('.tweet').on('mouseenter', function() { alert('Welcome, mouse pointer!') })
$('.tweet').off('mouseenter')
$('.tweet').on('mouseenter', function() { jQuery(this).animate({zoom: 1.5}) })
$('.tweet').on('mouseleave', function() { jQuery(this).animate({zoom: 1.0}) })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment