I have multiple rows, inside the rows there is some functionality like to increase decrease values, checkbox, price etc..based on price i am sorting the rows. it is generating properly but after creating the row internal functionality not working.
HTML Code(Clicking on private):
var categorysort = ["0 - 25", "25 - 50", "50 - 150", "150 and over"];
/images/up_arrow.png">
category
jQuery Code:
/* Sort by:- private start */
$('.sort-by .private').on('click', function(){
var items = $(".renderedItem");
var privatestatus = "Private";
$(".categorystatus").html("");
if(privatestatus = "Private"){
var itemMainDiv = "<div style='' aria-expanded='true' id='categorylist0' class='panel-collapse collapse privatediv' />" ;
}
var collapsiblepanel = $( "<div class='collapsiblepanel collapsibleParentDiv' style='display:none'/>" ).append(
$( "<div class='panel panel-default' />" ).append(
$( "<div class='panel-heading' />").append(
$('<div class="panel-title" />').append(
$('<div class="pull-left categoryblock" />').append(
$('<span class="categorytext" />').text(privatestatus),
$('<span class="link visible-xs">').append(
$('<a href="#" />').text('view checklist')
)
),
$('<span class="collapseexpand pull-right">').append(
$('<a class="collapsed" data-target="#categorylist0" data-toggle="collapse" href="#" aria-expanded="true"/>')
)
)
),
$(itemMainDiv)
)
);
$(".categorystatus").append(collapsiblepanel);
items.each(function(index) {
item = $(this);
itemtype = item.attr("itemtype");
if(itemtype == "Private") {
$(".privatediv").append(item);
}
});
var collPnlDivs = $('.collapsiblepanel');
collPnlDivs.each(function( index ) {
if($(this).find('.renderedItem').length > 0){
$(this).show();
}
});
});
/* Sort by:- private end */