27 lines
691 B
JavaScript
27 lines
691 B
JavaScript
$(document).ready(function() {
|
|
|
|
$('.open-panel').click(function(e) {
|
|
e.preventDefault();
|
|
target = $(this).attr('href');
|
|
$(target).addClass('open');
|
|
});
|
|
$('.panel .overlay').click(function(e) {
|
|
e.preventDefault();
|
|
$(this).parent().removeClass('open');
|
|
});
|
|
$('.panel .icon-close').click(function(e) {
|
|
e.preventDefault();
|
|
$(this).parent().parent().removeClass('open');
|
|
});
|
|
|
|
$('#privatesales_block ul .extra_info .small_title').each(function() {
|
|
if(window.matchMedia("(max-width:1199px)").matches) {
|
|
var nameProduct = $(this).text();
|
|
if(nameProduct.length > 20) {
|
|
nameProduct = nameProduct.substring(0,17)+"...";
|
|
$(this).text(nameProduct);
|
|
}
|
|
}
|
|
});
|
|
});
|