function updateMinTable(){

	/*Update the product table to display the item corresponding to the active index */
	var table = document.getElementById('productTableMin');
	var index=product.activeIndex;
	var fields = Object.keys(product[0]);
	
	for(var i=0;i<fields.length;i++){
		table.rows[i].cells[0].innerHTML=product[index][fields[i]]; //update each row of the product table(mobile view)
	}
	
	if(product.activeIndex<product.length-1){
		
			document.getElementById('nextBtn').innerHTML = product[product.activeIndex+1].product+'&gt';
			document.getElementById('prevBtn').innerHTML = '&lt' + product[product.activeIndex].product;
	}
	
	if(product.activeIndex==0){
				document.getElementById('prevBtn').className = 'inactive-link';
			}
	else {
		document.getElementById('prevBtn').className = '';
	}
	
	if(product.activeIndex==product.length-1){
			document.getElementById('nextBtn').className = 'inactive-link';
	}
	else{
		document.getElementById('nextBtn').className = '';
	}
	
}
/*	Update the next and previous buttons to navigate to other products visible in mobile view */
Update the next and previous buttons to navigate to other products visible in mobile view
Update the next and previous buttons to navigate to other products visible in mobile view
function updateMinTable(){
	var table = document.getElementById('productTableMin');
	var index=product.activeIndex;
	var fields = Object.keys(product[0]);
	for(var i=0;i<fields.length;i++){
		table.rows[i].cells[0].innerHTML=product[index][fields[i]]; 
	}
	if(product.activeIndex<product.length-1){
			document.getElementById('nextBtn').innerHTML = product[product.activeIndex+1].product+'&gt';
			document.getElementById('prevBtn').innerHTML = '&lt' + product[product.activeIndex].product;
	}
	if(product.activeIndex==0){
				document.getElementById('prevBtn').className = 'inactive-link';
			}
	else {
		document.getElementById('prevBtn').className = '';
	}
	if(product.activeIndex==product.length-1){
			document.getElementById('nextBtn').className = 'inactive-link';
	}
	else{
		document.getElementById('nextBtn').className = '';
	}
}
function updateMinTable ( ) { var table = document . getElementById ( 'productTableMin' ) ; var index = product . activeIndex ; var fields = Object . keys ( product [ 0 ] ) ; for ( var i = 0 ; i < fields . length ; i ++ ) { table . rows [ i ] . cells [ 0 ] . innerHTML = product [ index ] [ fields [ i ] ] ; } if ( product . activeIndex < product . length - 1 ) { document . getElementById ( 'nextBtn' ) . innerHTML = product [ product . activeIndex + 1 ] . product + '&gt' ; document . getElementById ( 'prevBtn' ) . innerHTML = '&lt' + product [ product . activeIndex ] . product ; } if ( product . activeIndex == 0 ) { document . getElementById ( 'prevBtn' ) . className = 'inactive-link' ; } else { document . getElementById ( 'prevBtn' ) . className = '' ; } if ( product . activeIndex == product . length - 1 ) { document . getElementById ( 'nextBtn' ) . className = 'inactive-link' ; } else { document . getElementById ( 'nextBtn' ) . className = '' ; } }
Update the next and previous buttons to navigate to other products visible in mobile view
Update the next and previous buttons to navigate to other products visible in mobile view
/*Update the product table to display the item corresponding to the active index */ //update each row of the product table(mobile view)
