<script type="text/javascript">
//Code added by Nitesh for RFE 670082 starts here
jQuery("input[name='hideLineItemColumns_quote']").click(function () {
alert(jQuery(this).attr('checked'));
if(jQuery(this).attr('checked')){
var columnName = $.trim($(this).val()).replace('\u00a0','');
$('thead.line-item-grid-header tr th').filter(function ()
{
if($.trim($('div', this).text()).replace(' ','') == columnName){
indexValue = $(this).index();
//Hiding body columns
jQuery('.line-item-grid-body').children('tr').each(function(){
jQuery(this).children('td:eq('+indexValue+')').hide();
});
//Hiding footer columns
jQuery('.line-item-grid-footer').children('tr').each(function(){
jQuery(this).children('th:eq('+indexValue+')').hide();
});
return true;
};
}).hide();
}
else{
var columnName = $.trim($(this).text()).replace('\u00a0','');
$('thead.line-item-grid-header tr th').filter(function ()
{
if($.trim($('div', this).text()).replace(' ','') == columnName){
indexValue = $(this).index();
//Showing body columns
jQuery('.line-item-grid-body').children('tr').each(function(){
jQuery(this).children('td:eq('+indexValue+')').show();
});
//Showing footer columns
jQuery('.line-item-grid-footer').children('tr').each(function(){
jQue开发者_高级运维ry(this).children('th:eq('+indexValue+')').show();
});
return true;
};
}).show();
}
});
Change
if(jQuery(this).attr('checked')){
to
if(jQuery(this).is(':checked')){
精彩评论