Удаление лишних строк после цитат и кодов (Alex_63)
В начало HTML-низ:
Код
<!-- Удаляем лишние строки после цитаты и кода // v.3 © Alex_63 -->
<script type="text/javascript">
$('.post-content').each(function() {
var CNT = $(this).html();
CNT = CNT.replace(/<p><br><\/p>/img,'');
CNT = CNT.replace(/<p><br><br>(.*?)<\/p>/img,'<p>$1</p>');
CNT = CNT.replace(/<p><br>(.*?)<\/p>/img,'<p>$1</p>');
$(this).html(CNT);
});
</script>
<script type="text/javascript">
$('.post-content').each(function() {
var CNT = $(this).html();
CNT = CNT.replace(/<p><br><\/p>/img,'');
CNT = CNT.replace(/<p><br><br>(.*?)<\/p>/img,'<p>$1</p>');
CNT = CNT.replace(/<p><br>(.*?)<\/p>/img,'<p>$1</p>');
$(this).html(CNT);
});
</script>
Просмотров: 617, Загрузок: 0, Оценка: 5.0 (2)
Страницы: | |