
Untitled
By: a guest on
May 23rd, 2012 | syntax:
None | size: 0.57 KB | hits: 10 | expires: Never
var $p1 = $("#Pagination");
$p1.click(function() {
//remove any other extra paginations (applicable only on second click)
$(".DABEAR_IS_GREAT").remove();
var $p2 = $p1.clone(true).addClass("DABEAR_IS_GREAT");
$p2.find("*").click( function(){
//re-add "bubbling" of event
$(this).closest(".pagination").click();
});
$p2.appendTo(document.body)
})
.click();
//replace the second pagination each time the first pagination is updated
$(".DABEAR_IS_GREAT").live("click", function(){
$(this).replaceWith($p1.clone(true));
})