(function ($) {
$(function () {
// Featured product
var pCount = $('#post_features_count').val();
$('.docopy-product-feature').click(function(){
pCount++;
$('.product-features-wrapper').append('
'
);
});
$(document).on('click', '.delete-single-feature', function(){
$(this).parents('.single-feature').remove();
});
//Pricing table
var tCount = $('#table_features_count').val();
$('.docopy-table-feature').click(function(){
tCount++;
$('.table-features-wrapper').append('Feature '+tCount+' :
'+
'
'+
'
'+
'
'
);
});
$(document).on('click', '.delete-table-feature > a', function(){
$(this).parents('.single-feature').remove();
});
/*Font awesome icons chooser*/
if($(".ap-cpt-select-icon").children().length == 0 ){
$('.ap-cpt-icons li').first().addClass('selected');
var firstIcon = $('.ap-cpt-icons li').first().children('i').attr('class');
$('.ap-cpt-select-icon').html('');
}
/*$('.ap-cpt-icons li').on('click', function(){*/
$(document).on('click', '.ap-cpt-icons li', function() {
$(this).parents('.ap-cpt-icons-wrapper').find('.ap-cpt-icons li').removeClass();
$(this).addClass('selected');
var iconValue = $(this).children('i').attr('class');
$(this).parents('.ap-cpt-icons-wrapper').find('.ap-cpt-select-icon').html('');
var passValue = iconValue.split(' ');
$(this).parents('.ap-cpt-icons-wrapper').find('.hidden-icon-input').val(passValue[1]);
});
});
}(jQuery));