From 9d2653ecd461b78b515b522f0b747c91d08afce3 Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 25 Aug 2010 13:56:38 -0700 Subject: [PATCH] Move some stuff out of document ready --- public/javascripts/view.js | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 62888422a..c50439768 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -1,31 +1,14 @@ $(document).ready(function(){ - $('#debug_info').click(function() { - $('#debug_more').toggle('fast', function() { - - }); + $('#debug_more').toggle('fast'); }); $("label").inFieldLabels(); $('#flash_notice, #flash_error, #flash_alert').delay(2500).slideUp(130); -//Called with $(selector).clearForm() - $.fn.clearForm = function() { - return this.each(function() { - var type = this.type, tag = this.tagName.toLowerCase(); - if (tag == 'form') - return $(':input',this).clearForm(); - if (type == 'text' || type == 'password' || tag == 'textarea') - this.value = ''; - //else if (type == 'checkbox' || type == 'radio') - //this.checked = false; - else if (tag == 'select') - this.selectedIndex = -1; - $(this).blur(); - }); - }; + $("div.image_cycle").cycle({ fx: 'fade', @@ -84,3 +67,19 @@ function pane_toggler_button( name ) { } ); } + +//Called with $(selector).clearForm() + $.fn.clearForm = function() { + return this.each(function() { + var type = this.type, tag = this.tagName.toLowerCase(); + if (tag == 'form') + return $(':input',this).clearForm(); + if (type == 'text' || type == 'password' || tag == 'textarea') + this.value = ''; + //else if (type == 'checkbox' || type == 'radio') + //this.checked = false; + else if (tag == 'select') + this.selectedIndex = -1; + $(this).blur(); + }); + };