This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="bg-gray-100 h-screen w-screen flex justify-center"> | |
<div class="mr-8"> | |
<h1 class="font-medium max-w-xl mx-auto pt-10 pb-4">Smooth Accordion</h1> | |
<div class="bg-white max-w-xl mx-auto border border-gray-200" x-data="{selected:1}"> | |
<ul class="shadow-box"> | |
<li class="relative border-b border-gray-200"> | |
<button type="button" class="w-full px-8 py-6 text-left" @click="selected !== 1 ? selected = 1 : selected = null"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Scroll to top--> | |
<div class="scroll-to-top scroll-to-target" data-target="html"><span class="fa fa-angle-up"></span></div> | |
//Update Header Style and Scroll to Top | |
function headerStyle() { | |
if($('.main-header').length){ | |
var windowpos = $(window).scrollTop(); | |
var siteHeader = $('.main-header'); | |
var scrollLink = $('.scroll-to-top'); | |
if (windowpos >= 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// loop | |
<?php while(have_posts()): the_post(); ?> | |
<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> | |
<?php endwhile; ?> | |
//Thumbnail | |
<?php | |
if(has_post_thumbnail()){ | |
the_post_thumbnail("large", array('class' => 'img-fluid')); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mainSlider() { | |
var BasicSlider = $('.slider-active'); | |
BasicSlider.on('init', function(e, slick) { | |
var $firstAnimatingElements = $('.single-slider:first-child').find('[data-animation]'); | |
doAnimations($firstAnimatingElements); | |
}); | |
BasicSlider.on('beforeChange', function(e, slick, currentSlide, nextSlide) { | |
var $animatingElements = $('.single-slider[data-slick-index="' + nextSlide + '"]').find('[data-animation]'); | |
doAnimations($animatingElements); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// way one | |
var i = 1; | |
$('.owl-carousel .owl-dot').each(function(){ | |
$(this).text(i); | |
i++; | |
}); | |
//way two | |
var dot = $('.slideWrap .owl-dot'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
last 2 child add class | |
------------------------ | |
$('ul.menu>li').slice(-2).addClass('last-elements'); | |
lenth | |
--------- | |
if ($(".active").length) { | |
$(".active").dropify(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/nicolafranchini/VenoBox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// active | |
$('.pt-wrp').on('mouseenter', function () { | |
$(this).addClass('active').parent().siblings().find('.pt-wrp').removeClass('active'); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var animation_start_pos = 0, animation_end_pos = 1000; //where you want the animation to stop | |
$(document).scroll(function() { | |
var scroll_pos = $(this).scrollTop(); | |
var percentScrolled = parseFloat(scroll_pos/animation_end_pos); | |
jQuery('.people-opacity').css('opacity', percentScrolled ); | |
}); | |
html // | |
<div class="people-opacity" style="opacity: 0;"></div> |
NewerOlder