X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/24aa60ec77e9f084f9eb9e31aaead04dfe8e7321..b3dc95b9021005081623cca2bd9954f5fdc19ba1:/static/js/init.js diff --git a/static/js/init.js b/static/js/init.js index 29ccd41..3257288 100644 --- a/static/js/init.js +++ b/static/js/init.js @@ -12,7 +12,26 @@ var philo_site = { var $this = $(this); $this.parent().children().removeClass('expanded').removeClass('shrunk'); } + }, + anchor_light: { + init: function () { + var self = philo_site.anchor_light; + links = $('a[href^="#"]'); + links.click(self.hiliteHandler); + }, + hiliteHandler: function () { + var self = philo_site.anchor_light, + $this = $(this), + id = $this.attr('href'), + el = $(id); + el.addClass("lite"); + setTimeout(self.unhiliteHandler, 1000); + }, + unhiliteHandler: function () { + $('.lite').removeClass('lite'); + } } } -$(philo_site.three_up.init); \ No newline at end of file +$(philo_site.three_up.init); +$(philo_site.anchor_light.init); \ No newline at end of file