abcdefghjklm
Page 5 of 7 • Share
Page 5 of 7 • 1, 2, 3, 4, 5, 6, 7
Re: abcdefghjklm
- Spoiler:
- Code:
$(document).ready(function() {
var a=[], i=0;
$("p").click(function() {
$("div.post").each(function() {
a[i]=$(this).find("div.signature_div").text();
i=i+1;
$("p").append(a[i]);
});
});
});
Last edited by Admin on Sat Feb 21, 2015 4:10 pm; edited 1 time in total
Re: abcdefghjklm
- Spoiler:
- $(function()
{
var a, i = 0, k=1, z=0;
var e = [];
$("div.post").each(function() {
e[i] = $("div.signature_div", this).text();
i=i++;
});
z=e.length;
if (z>1) {
for (var j=0;j<=z;j++) {
a=$(this);
for (var l=k;k<=z;k++) {
if (e[i]=e[j]) $(a).find("div.signature_div").remove();
}
}
}
var f = location.hash;
location.hash = "";
location.hash = f
});
$(function()
{
var c = "", a, d = 0, b = 0;
$("div.post").each(function() //Mỗi div.post
{
var e = $(".postprofile dt", this).text(); //e là profile hiện tại
e != c //Kiểm tra xem profile có trống không
? //Nếu có
(
d++, //d tăng
b++, //b tăng
a = $(this), //a là profile hiện tại
(b % 2) != ((d % 2) && a.toggleClass("row1 row2")), //d%2 trả true nếu d lẻ, b%2
c = e //c là profile hiện tại
)
: //Nếu không
(
b++, //b tăng
$(a).find("div.signature_div").remove(), //Tìm và bỏ signature
$("div.postbody", a).append //Với mỗi div.postbody, thêm vào:
(
$("div.postbody", this).attr("class", "doublepost").attr //class: double post
(
"id", $(this).attr("id").replace(/^p([0-9]+)$/, "$1") //id: thay tất cả đoạn id có dạng "px" (x là số tự nhiên) bằng $1
)
),
$(this).remove() //Loại bỏ
)
});
var f = location.hash;
location.hash = "";
location.hash = f
});
Page 5 of 7 • 1, 2, 3, 4, 5, 6, 7
Page 5 of 7
Permissions in this forum:
You cannot reply to topics in this forum
|
|