X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/78e68053e3f159e7e9882bc178b7392f1c3a8222..f4ec4ce7ba83b9aab095da9da70b500147d6dfc5:/static/js/init.js diff --git a/static/js/init.js b/static/js/init.js new file mode 100644 index 0000000..29ccd41 --- /dev/null +++ b/static/js/init.js @@ -0,0 +1,18 @@ +var philo_site = { + three_up: { + init: function(){ + $('.three-up figure').hover(philo_site.three_up.activate, philo_site.three_up.deactivate); + }, + activate: function(){ + var $this = $(this); + $this.addClass('expanded'); + $this.parent().children().not($this).addClass('shrunk'); + }, + deactivate: function(){ + var $this = $(this); + $this.parent().children().removeClass('expanded').removeClass('shrunk'); + } + } +} + +$(philo_site.three_up.init); \ No newline at end of file