From 0bcf819b071545d8e536bd2f224a13c9e58fb185 Mon Sep 17 00:00:00 2001 From: raylu Date: Mon, 4 Jul 2011 02:09:47 -0700 Subject: reorganize JS --- views/layouts/default.html.php | 21 +-------------------- views/pages/home.html.php | 8 ++++++++ webroot/js/functions.js | 27 +++++++++++++++------------ 3 files changed, 24 insertions(+), 32 deletions(-) diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php index bc5ac36..1eac7f1 100644 --- a/views/layouts/default.html.php +++ b/views/layouts/default.html.php @@ -87,28 +87,9 @@ use \lithium\security\Auth; html->script("/js/jquery.tools.min.js"); ?> html->script("/js/jquery.form.js"); ?> html->script("/js/jquery.tipsy.js"); ?> -html->script("/js/functions.js"); ?> html->script("/js/jquery.prettyPhoto.js"); ?> - - - +html->script("/js/functions.js"); ?> scripts(); ?> - diff --git a/views/pages/home.html.php b/views/pages/home.html.php index 9d39b95..bdb46ca 100644 --- a/views/pages/home.html.php +++ b/views/pages/home.html.php @@ -81,3 +81,11 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.


+ + + +scripts(ob_get_clean()); ?> diff --git a/webroot/js/functions.js b/webroot/js/functions.js index 4118525..87fcb72 100644 --- a/webroot/js/functions.js +++ b/webroot/js/functions.js @@ -1,6 +1,9 @@ jQuery(document).ready(function($) { + var login = $("a[href='/login']"); + login.attr('href', '#login'); + login.attr('title', ''); + login.prettyPhoto({deeplinking: false, social_tools: false}); -//Portfolio Hover Effect $('.portfolio-small li img, .portfolio-list li img').hover(function() { $(this).children('a').show(); $('.portfolio-small li img, .portfolio-list li img').stop().animate({ opacity: .5 }, 300); @@ -9,15 +12,15 @@ jQuery(document).ready(function($) { $('.portfolio-small li img, .portfolio-list li img').stop().animate({ opacity: 1 }, 300); }); -//Homepage Screenshot Scroll -$(".scrollable").scrollable(); + $('.tooltip').tipsy({fade: true}); + $('.tooltip.north').tipsy({fade: true, gravity: 's'}); + $('.tooltip.east').tipsy({fade: true, gravity: 'w'}); + $('.tooltip.west').tipsy({fade: true, gravity: 'e'}); + $('form [title]').tipsy({fade: true, trigger: 'focus', gravity: 'w'}); -// Tipsy Tooltips -$('.tooltip').tipsy({fade: true}); -$('.tooltip.north').tipsy({fade: true, gravity: 's'}); -$('.tooltip.east').tipsy({fade: true, gravity: 'w'}); -$('.tooltip.west').tipsy({fade: true, gravity: 'e'}); -// Form Tooltips -$('form [title]').tipsy({fade: true, trigger: 'focus', gravity: 'w'}); - -}); + setTimeout(function() { + $(".flash-message").fadeOut("slow", function () { + $(".flash-message").remove(); + }); + }, 2000); +}); -- cgit v1.2.3