| Current Path : /home/digilove/public_html/components/com_marketplace/js/ |
| Current File : /home/digilove/public_html/components/com_marketplace/js/sellerlist.js |
var r_pr=0;
var r_vl=0;
var r_ql=0;
jQuery(".price_rating .hover .star").on('click',function(){
r_pr=jQuery(this).attr('rel');
jQuery('.price_rate').attr('value',r_pr);
jQuery(this).addClass('fa-star');
jQuery(this).removeClass('fa-star-o');
jQuery(this).prevAll('.fa').addClass('fa-star');
jQuery(this).prevAll('.fa').removeClass('fa-star-o');
jQuery(this).nextAll('.fa').addClass('fa-star-o');
jQuery(this).nextAll('.fa').removeClass('fa-star');
});
jQuery(".value_rating .hover .star").on('click',function(){
r_vl=jQuery(this).attr('rel');
jQuery('.value_rate').attr('value',r_vl);
jQuery(this).addClass('fa-star');
jQuery(this).removeClass('fa-star-o');
jQuery(this).prevAll('.fa').addClass('fa-star');
jQuery(this).prevAll('.fa').removeClass('fa-star-o');
jQuery(this).nextAll('.fa').addClass('fa-star-o');
jQuery(this).nextAll('.fa').removeClass('fa-star');
});
jQuery(".quality_rating .hover .star").on('click',function(){
r_ql=jQuery(this).attr('rel');
jQuery('.quality_rate').attr('value',r_ql);
jQuery(this).addClass('fa-star');
jQuery(this).removeClass('fa-star-o');
jQuery(this).prevAll('.fa').addClass('fa-star');
jQuery(this).prevAll('.fa').removeClass('fa-star-o');
jQuery(this).nextAll('.fa').addClass('fa-star-o');
jQuery(this).nextAll('.fa').removeClass('fa-star');
});
jQuery("#mk_review").on('click', function(){
jQuery(".mk_review").css("display","block");
});
});
jQuery(function(){
jQuery(".grd").on('click',function(){
window.location="<?php echo JRoute::_("index.php?option=com_marketplace&view=productlist&id=".$seller_id."&mode=grid");?>";
});
jQuery(".lst").on('click',function(){
window.location="<?php echo JRoute::_("index.php?option=com_marketplace&view=productlist&id=".$seller_id."&mode=list");?>";
});
jQuery("#recent-product .grid_view").on("mouseover",".recent_pro",function(){
jQuery(this).find(".hover_product").css("display","block");
});
jQuery("#recent-product .grid_view").on("mouseout",".recent_pro",function(){
jQuery(this).find(".hover_product").css("display","none");
});
jQuery('body').on('mouseenter','.recent_pro',function(){
jQuery(this).children().last().fadeIn();
jQuery(this).mouseleave(function(){
jQuery(this).children().last().fadeOut();
});
});
var maxHeight = Math.max.apply(null, jQuery(".seller_profile_view_main .recent_pro").map(function ()
{
return jQuery(this).height();
}).get());
jQuery(".seller_profile_view_main .recent_pro").css('height',maxHeight);
});
jQuery(window).on('load',combind);
jQuery(window).on('resize',combind);
function combind(){
var tot_width=jQuery('.recent_pro').parent().width();
var tot_container=parseInt((tot_width-30)/175);
var tot_container=parseInt((tot_width-(tot_container*10))/175);
var container_remain=(tot_width-(tot_container*10))%175;
var margin_calc=10+(container_remain-tot_container)/(tot_container+1);
if(tot_container==1){
jQuery('.recent_pro').css('margin-left','0px');
jQuery('.recent_pro').css('width',tot_width-20+"px");
}else{
jQuery('.recent_pro').css('width',"165px");
jQuery('.recent_pro').css('margin-left',margin_calc);
}
}