Commit 90b6a56ab22585f93c11ac668077d93978dbb0ba
1 parent
0d2ab942
Exists in
master
and in
12 other branches
Adding link to the article for it's lead text
Showing
1 changed file
with
16 additions
and
0 deletions
Show diff stats
theme.js
... | ... | @@ -103,8 +103,24 @@ $('#link-buscar').click(function(e) { |
103 | 103 | $('.article-body').append(article_actions); |
104 | 104 | } |
105 | 105 | |
106 | + function add_link_to_article_div(){ | |
107 | + var list = $('.display-content-block').find('li'); | |
108 | + | |
109 | + list.each(function(){ | |
110 | + var link = $(this).find('.title').find('a').attr('href'); | |
111 | + var text = $(this).find('.lead').find('p').text(); | |
112 | + var leadLink = $('<a></a>'); | |
113 | + | |
114 | + leadLink.attr('href', link); | |
115 | + leadLink.text(text); | |
116 | + | |
117 | + $(this).find('.lead').html(leadLink); | |
118 | + }); | |
119 | + } | |
120 | + | |
106 | 121 | $(document).ready(function(){ |
107 | 122 | set_events(); |
108 | 123 | move_article_buttons(); |
124 | + add_link_to_article_div(); | |
109 | 125 | }); |
110 | 126 | })(jQuery); | ... | ... |