summaryrefslogtreecommitdiff
path: root/sphinx/themes/basic/static/websupport.js
diff options
context:
space:
mode:
authorDaniel Neuhäuser <ich@danielneuhaeuser.de>2010-08-13 17:17:40 +0200
committerDaniel Neuhäuser <ich@danielneuhaeuser.de>2010-08-13 17:17:40 +0200
commit2742399e800c2e677b15099b2adc65366899f9b3 (patch)
tree3c5718798ba81877d280db4d23a76b0bbd7be4df /sphinx/themes/basic/static/websupport.js
parent030833e8c5dced1840eac5094d67fe313d92ef7f (diff)
downloadsphinx-git-2742399e800c2e677b15099b2adc65366899f9b3.tar.gz
Implement $.fn.comment more efficiently
Diffstat (limited to 'sphinx/themes/basic/static/websupport.js')
-rw-r--r--sphinx/themes/basic/static/websupport.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/sphinx/themes/basic/static/websupport.js b/sphinx/themes/basic/static/websupport.js
index 079497a06..cf0edf9b5 100644
--- a/sphinx/themes/basic/static/websupport.js
+++ b/sphinx/themes/basic/static/websupport.js
@@ -630,9 +630,12 @@
var title = count + ' comment' + (count == 1 ? '' : 's');
var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
$(this).append(
- $('<a href="#" class="sphinx_comment"></a>')
- .html('<img src="' + image + '" alt="comment" />')
- .attr('title', title)
+ $(document.createElement('a')).attr({href: '#', class: 'spinx_comment'})
+ .append($(document.createElement('img')).attr({
+ src: image,
+ alt: 'comment',
+ title: title
+ }))
.click(function(event) {
event.preventDefault();
show($(this).parent().attr('id'));