Commit 7afa41276cd4a2f5944a488ffad43b99868ad602
1 parent
d483f764
Exists in
master
and in
6 other branches
Implementing script to inject some divs to notices
Signed-off-by: pedrodelyra <pedrodelyra@gmail.com> Signed-off-by: simiaosimis <simiaosimis@gmail.com>
Showing
1 changed file
with
17 additions
and
0 deletions
Show diff stats
theme.js
@@ -118,9 +118,26 @@ $('#link-buscar').click(function(e) { | @@ -118,9 +118,26 @@ $('#link-buscar').click(function(e) { | ||
118 | }); | 118 | }); |
119 | } | 119 | } |
120 | 120 | ||
121 | + function insert_notice_div(){ | ||
122 | + var notice = $('.display-content-block').find('li'); | ||
123 | + notice.each(function(){ | ||
124 | + var $set = $(this).children(); | ||
125 | + for(var i=1, len = $set.length; i < len; i+=5){ | ||
126 | + $set.slice(i, i+5).wrapAll('<div class="notice-item"/>'); | ||
127 | + } | ||
128 | + for(var i=2, len = $set.length; i < len; i+=3){ | ||
129 | + $set.slice(i, i+3).wrapAll('<div class="notice-info"/>'); | ||
130 | + } | ||
131 | + //$('<div class="notice-item"></div>').wrap($(this).find( '.image', '.title', '.lead', '.read_more')); | ||
132 | + }); | ||
133 | + | ||
134 | + | ||
135 | + } | ||
136 | + | ||
121 | $(document).ready(function(){ | 137 | $(document).ready(function(){ |
122 | set_events(); | 138 | set_events(); |
123 | move_article_buttons(); | 139 | move_article_buttons(); |
124 | add_link_to_article_div(); | 140 | add_link_to_article_div(); |
141 | + insert_notice_div(); | ||
125 | }); | 142 | }); |
126 | })(jQuery); | 143 | })(jQuery); |