Skip to content

Instantly share code, notes, and snippets.

View aliboy08's full-sized avatar

Alistair Ponce aliboy08

  • Philippines
View GitHub Profile
@aliboy08
aliboy08 / ff-have-more-posts.php
Created February 24, 2023 01:57
check if have more posts
@aliboy08
aliboy08 / custom-toggle
Created February 9, 2023 06:10
custom toggle
(function($){$(function(){
function custom_toggle(){
$('.custom_toggle').each(function(){
var _ = this;
var el = $(this);
if( typeof el.data('toggle-text') !== 'undefined' ) {
_.toggle_text_el = el.find('.text');
_.toggle_text_on = el.data('toggle-text');
.custom-popup {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgb(0 0 0 / 10%);
display: flex;
align-items: center;
justify-content: center;
@aliboy08
aliboy08 / realtime-search.js
Created February 8, 2023 00:21
Realtime search
(function($){$(function(){
function realtime_search(){
$('.realtime_search').each(function(){
var el = this;
var $el = $(this);
var items = $($el.data('target')).find($el.data('target-item'));
var search_fields = $el.data('search-fields').split(',');
@aliboy08
aliboy08 / woo-add-to-cart.js
Created February 1, 2023 02:34
Woocommerce add to cart
(function($){$(function(){
function add_to_cart(atts){
var data = {
action: 'ff_add_to_cart_ajax',
product_id: atts.product_id,
product_sku: '',
quantity: ( typeof atts.quantity !== 'undefined' ) ? atts.quantity : 1,
variation_id: ( typeof atts.variation_id !== 'undefined' ) ? atts.variation_id : 0,
@aliboy08
aliboy08 / elementor-sections-toggle.css
Created January 18, 2023 03:21
Elementor Sections Toggle
.elementor-editor-active .elementor-inner > .elementor-section-wrap > section:not(.banner){
background: #fff;
padding: 60px 0;
margin: 120px 0;
}
.custom-sections-container {
background: #fff;
max-width: 1400px;
margin: auto;
@aliboy08
aliboy08 / custom-section-tabs.css
Last active January 13, 2023 08:23
Elementor Custom Section Tabs
.elementor-editor-active selector section:before {
content: 'CUSTOM TAB SECTION START';
background: #eee;
display: block;
text-align: center;
padding: 20px;
margin-top: 50px;
}
.elementor-editor-active selector section:after {
@aliboy08
aliboy08 / custom-gallery.css
Created January 13, 2023 06:38
Custom Gallery
@aliboy08
aliboy08 / custom-tabs.js
Last active January 9, 2023 01:11
Custom Tabs
(function($){$(function(){
function FF_Tabs( opts ){
this.nav = opts.nav;
this.content = opts.content;
this.current = {
nav: null,
content: null,
index: null,
@aliboy08
aliboy08 / follow-cursor.js
Created December 28, 2022 02:47
follow cursor js (using gsap)
(function($){$(function(){
function FF_Follow_Cursor( options ){
var container = $(options.container);
var btn = $(options.btn);
this.btn = btn;
var follow_animation_duration = .5;