50 lines
1.5 KiB
JavaScript
Executable File
50 lines
1.5 KiB
JavaScript
Executable File
$( '.main-content' ).each(function() {
|
|
|
|
$(this).find('.block-title a').click(function(e){
|
|
e.preventDefault();
|
|
if($(this).parent().parent().hasClass('active') ){
|
|
$(this).parent().parent().removeClass('active');
|
|
}
|
|
else{
|
|
$(this).parent().parent().addClass('active');
|
|
}
|
|
});
|
|
$('.grid-mode-btn').click(function(e){
|
|
e.preventDefault();
|
|
$(this).parent().find('a').removeClass('active');
|
|
$(this).addClass('active');
|
|
$('#tabs-grid').show();
|
|
$('#tabs-list').hide();
|
|
});
|
|
$('.list-mode-btn').click(function(e){
|
|
e.preventDefault();
|
|
$(this).parent().find('a').removeClass('active');
|
|
$(this).addClass('active');
|
|
$('#tabs-grid').hide();
|
|
$('#tabs-list').show();
|
|
});
|
|
});
|
|
|
|
(function($) {
|
|
"use strict";
|
|
/* [ Filter by price ]
|
|
- - - - - - - - - - - - - - - - - - - - */
|
|
$('#slider-range').slider({
|
|
|
|
range: true,
|
|
|
|
min: 0,
|
|
|
|
max: 500,
|
|
|
|
values: [0, 300],
|
|
|
|
slide: function (event, ui) {
|
|
|
|
$('#amount').html('<span class="left-price">' + ui.values[0] + '</span> <span class="firts"> - </span><span class="right-price">' + ui.values[1] + '</span>');
|
|
}
|
|
});
|
|
|
|
$('#amount').html('<span class="left-price">' + $('#slider-range').slider('values', 0) + '</span> <span class="firts"> - </span><span class="right-price">' + $('#slider-range').slider('values', 1));
|
|
})(jQuery);
|