From 5e91a7bb68913944b38f2167a5d41cc661116a95 Mon Sep 17 00:00:00 2001 From: wei <> Date: Mon, 15 Jan 2007 00:25:41 +0000 Subject: fix js errors --- demos/quickstart/protected/controls/Comments/comments.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/demos/quickstart/protected/controls/Comments/comments.js b/demos/quickstart/protected/controls/Comments/comments.js index 4e0cdf67..6364903a 100644 --- a/demos/quickstart/protected/controls/Comments/comments.js +++ b/demos/quickstart/protected/controls/Comments/comments.js @@ -118,9 +118,9 @@ function add_comment_tag(el) var tag = "
"+comments+"
 
"; new Insertion.Before(el, tag); var tag_div = $(id); - Event.observe(tag_div, "mouseover", function(e){ show_block(el); }); - Event.observe(tag_div, "mouseout", function(e){ hide_block(el); }); - Event.observe(tag_div, "click", function(e) { show_comments(el); Event.stop(e); }); + Event.observe(tag_div, "mouseover", function(e){ if(show_block) show_block(el); }); + Event.observe(tag_div, "mouseout", function(e){ if(hide_block) hide_block(el); }); + Event.observe(tag_div, "click", function(e) { if(show_comments) show_comments(el); Event.stop(e); }); } function increment_count_tag(id) @@ -167,8 +167,8 @@ function get_comment_count(id) $$('#content .block-content').each(function(el) { - Event.observe(el, 'mouseover', function(e){ show_block(Event.element(e)); }); - Event.observe(el, 'mouseout', function(e){ hide_block(Event.element(e)); }); + Event.observe(el, 'mouseover', function(e){ if(show_block) show_block(Event.element(e)); }); + Event.observe(el, 'mouseout', function(e){ if(hide_block) hide_block(Event.element(e)); }); add_comment_tag(el); }); -- cgit v1.2.3