From 57f1cdf96b0499059ea9d98e129c379f273de83d Mon Sep 17 00:00:00 2001 From: Adolfo Fitoria Date: Mon, 3 Oct 2011 16:41:32 -0300 Subject: Fixes(kind of): auto highlight #hash anchor on any url http://bugs.askbot.org/issues/83 --- askbot/skins/default/templates/question.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/askbot/skins/default/templates/question.html b/askbot/skins/default/templates/question.html index 06cd1332..637f8afb 100644 --- a/askbot/skins/default/templates/question.html +++ b/askbot/skins/default/templates/question.html @@ -529,6 +529,18 @@ $('#fmanswer textarea').focus(); } {% if settings.ENABLE_SHARING_GOOGLE %}$.getScript("http://apis.google.com/js/plusone.js"){% endif %} + var answer_id = window.location.hash.substring(1); + if (answer_id!=""){ + $("#answer-container-" + answer_id).addClass('highlight'); + $("#answer-container-" + answer_id).hide(); + $("#answer-container-" + answer_id).fadeIn(2000); + //using window.setTimeout + /*function foo(){ + $("#answer-container-" + answer_id).removeClass('highlight') + } + var timeout = window.setTimeout(foo, 2000); + */ + } }); function initEditor(){ -- cgit v1.2.3-1-g7c22