summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo Fitoria <adolfo.fitoria@gmail.com>2011-10-03 16:41:32 -0300
committerAdolfo Fitoria <adolfo.fitoria@gmail.com>2011-10-03 17:11:37 -0300
commit57f1cdf96b0499059ea9d98e129c379f273de83d (patch)
treeeee3293149eafb164f3d03a839e3d30eb3bb60e9
parentbaa02367ecd75932ed785efe44b129c8d773696e (diff)
downloadaskbot-57f1cdf96b0499059ea9d98e129c379f273de83d.tar.gz
askbot-57f1cdf96b0499059ea9d98e129c379f273de83d.tar.bz2
askbot-57f1cdf96b0499059ea9d98e129c379f273de83d.zip
Fixes(kind of): auto highlight #hash anchor on any url
http://bugs.askbot.org/issues/83
-rw-r--r--askbot/skins/default/templates/question.html12
1 files changed, 12 insertions, 0 deletions
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(){