
Untitled
By: a guest on
Jun 13th, 2012 | syntax:
None | size: 1.27 KB | hits: 22 | expires: Never
Increment Badge Count
jQuery.fn.add = function() {
var Bnumber = $(this).find(".B_Add");
if (Bnumber) {
Bcount = parseInt(Bnumber.html()) + 1;
$(this).find("div.B_Add").remove();
$(this).parent().find(".B_List").append('<div class="Badge B_Add">'+ Bcount +'</div>');
} else {
$(this).find(".B_List").append('<div class="Badge B_Add">1</div>');
}
}
jQuery.fn.add = function() {
if ($(this).find(".Badge").hasClass(".B_add")) {
bCount = parseInt($(this).find(".B_add").text());
$(this).find(".B_add").remove();
$(".OPT .B_list").append('<div class="Badge B_add">'+(bCount+1)+'</div>');
} else {
$(".OPT .B_list").append('<div class="Badge B_add">0</div>');
}
}
jQuery.fn.add = function() {
var Bnumber = $(".B_Add");
if (Bnumber) {
var Bcount = parseInt(Bnumber.html()) + 1;
Bnumber.html(Bcount);
} else {
$(this).find(".B_List").append('<div class="Badge B_Add">1</div>');
}
}
Bcount = parseInt(Bnumber.text()) + 1;
jQuery.fn.add = function() {
var badge = $('.B_Add', this);
if (badge.length) {
badge.html(Number(badge.html()) + 1);
} else {
$('.B_List', this).append('<div class="Badge B_Add">1</div>');
}
}