Commit e7d4f7b2 by Manzar Hussain

add custom-d js

parent 233ddd60
......@@ -18,7 +18,6 @@ global-style:
js:
js/slick.min.js: {}
js/custom.js: {}
js/mwheelIntent.js: {}
js/masonry.pkgd.min.js: {}
js/lightbox.js: {}
......@@ -26,5 +25,7 @@ global-style:
js/jquery.mousewheel.js: {}
js/jquery.jscrollpane.min.js: {}
js/imagesloaded.pkgd.min.js: {}
js/custom.js: {}
js/custom-d.js: {}
dependencies:
- core/jquery
(function ($) {
if ($(".e-r-slider").length) {
$(".e-r-slider").slick({
autoplay: true,
autoplaySpeed:3000,
speed: 1000,
dots: true,
arrows: false,
infinite: false,
slidesToShow: 1,
slidesToScroll: 1,
fade:true,
asNavFor: '.e-r-img-slider',
responsive: [
{
breakpoint: 767,
settings: {
dots: false,
}
}
]
});
$('.e-r-img-slider').slick({
asNavFor: '.e-r-slider',
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
dots: false,
infinite: false,
responsive: [
{
breakpoint: 767,
settings: {
dots: true,
}
}
]
});
}
if ($(".ap-slider").length) {
$(".ap-slider").slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
dots: false,
infinite: false
});
}
$('.f-dropdown-l .d-value').click(function(){
$(this).parent().toggleClass('open');
});
$('.f-dropdown-w .list li').click(function(e){
e.preventDefault();
$(this).closest('.f-dropdown-l').find('.d-value').text($(this).text());
$(this).closest('.f-dropdown-l').toggleClass('open');
});
//overlay popup
$(".btn-popup").click(function(e){
e.preventDefault();
var target = $(this).attr('data-link');
$(`<div class="modal-backdrop show"></div>`).insertAfter('.modal').addClass('fade ');
$(".modal[id="+target+"]").show();
$("body").addClass('modal-open');
});
$(document).on("click", ".modal-backdrop, .modal .close", function() {
$(".modal").hide();
$(".modal-backdrop").remove();
$("body").removeClass('modal-open');
})
// hide element outside click of element
$(document).mouseup(function(e)
{
var container = $(".f-dropdown-l.open");
// if the target of the click isn't the container nor a descendant of the container
if (!container.is(e.target) && container.has(e.target).length === 0)
{
container.removeClass('open');
}
});
})(jQuery);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment