| Current Path : /home/digilove/public_html/components/com_marketplace/js/ |
| Current File : /home/digilove/public_html/components/com_marketplace/js/sellerprofile.js |
if (typeof jQuery == 'undefined') {
document.write(unescape("%3Cscript src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
}
jQuery(function() {
jQuery(document).ready(function() {
jQuery('#horizontalTab').easyResponsiveTabs({
type: 'vertical', //Types: default, vertical, accordion
width: 'auto', //auto or any width like 600px
fit: true, // 100% fit in a container
closed: 'accordion', // Start closed if in accordion view
activate: function(event) { // Callback function if tab is switched
var $tab = jQuery(this);
var $info = jQuery('#tabInfo');
var $name = jQuery('span', $info);
$name.text($tab.text());
$info.show();
}
});
jQuery('#verticalTab').easyResponsiveTabs({
type: 'vertical',
width: 'auto',
fit: true
});
});
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(this).hide();
});
});
jQuery(function() {
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);
}
}
//});