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 to handle the intersection of the observed element | |
function handleIntersection(entries, observer) { | |
entries.forEach(entry => { | |
const targetSection = document.getElementById('tetosection'); // Replace 'my-section' with your section's ID | |
if (entry.target === targetSection) { | |
if (entry.isIntersecting) { | |
targetSection.classList.add('highlightsc'); | |
} else { | |
targetSection.classList.remove('highlightsc'); |
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
<a id="sctop"> | |
<span> <svg enable-background="new 0 0 32 32" id="Слой_1" version="1.1" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path clip-rule="evenodd" d="M26.704,10.192l-9.999-9.899 c-0.397-0.393-1.03-0.378-1.428,0l-9.999,9.9c-0.394,0.391-0.394,1.024,0,1.414c0.395,0.391,1.034,0.391,1.429,0l8.275-8.192V31 c0,0.552,0.452,1,1.01,1s1.01-0.448,1.01-1V3.414l8.275,8.192c0.394,0.391,1.034,0.391,1.428,0 C27.099,11.216,27.099,10.583,26.704,10.192z" fill="#121313" fill-rule="evenodd" id="Arrow_Upward"/><g/><g/><g/><g/><g/><g/></svg></span> | |
</a> | |
<script> | |
//this for header sticky | |
jQuery(document).ready(function($) { | |
$(window).on('scroll', function (){ | |
var sticky = $('.scheader'), | |
scroll = $(window).scrollTop(); |
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="scmenu-link-w act" id="sc81"> | |
<div class="scmenu-link is--top"></div> | |
<div class="scmenu-link is--btm"></div> | |
</div> | |
div#elementor-popup-modal-373 { | |
z-index: 555!important; | |
} |
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
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> | |
<script type="text/javascript"> | |
var $ = jQuery; | |
$(document).ready(function(){ | |
$('.show-more').on('click', function(){ | |
event.preventDefault() | |
$(this).toggleClass('content-hide') | |
$(this).closest('.profile-card').find('.show-less, .details-area').toggleClass('content-hide') | |
}) |
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
//this for SLUG url lowercase to uppercase | |
add_filter( 'sanitize_title', 'wpse5029_sanitize_title_with_dashes', 10, 3 ); | |
function wpse5029_sanitize_title_with_dashes($title, $raw_title, $context = 'display') { | |
$title = strip_tags( $raw_title ); | |
// Preserve escaped octets. | |
$title = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title ); | |
// Remove percent signs that are not part of an octet. | |
$title = str_replace( '%', '', $title ); | |
// Restore octets. |
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
window.addEventListener('load', function(event) { | |
fadeAway(); | |
function fadeAway() { | |
var delay = 1000; // Adjust the delay in milliseconds as needed | |
var duration = 500; // Adjust the duration in milliseconds as needed | |
// Check if jQuery is defined and if not, load it | |
if (typeof jQuery === 'undefined') { | |
var script = document.createElement('script'); |
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
$(document).ready(function() { | |
$('.scshow').click(function() { | |
var parentDiv = $(this).closest('.scteto'); | |
if (parentDiv.hasClass('highlighted')) { | |
parentDiv.removeClass('highlighted'); | |
} else { | |
parentDiv.addClass('highlighted'); | |
} | |
}); |
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
<?php | |
add_shortcode( 'fs_prev_next_thumbs', 'generate_faq_landing_link_shortcode' ); | |
function generate_faq_landing_link_shortcode( $atts, $content ) { | |
global $post; // if outside the loop | |
$prev_next = ''; | |
$prev_post = get_previous_post(); | |
$next_post = get_next_post(); |
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
// Limit media library access | |
add_filter( 'ajax_query_attachments_args', 'wpb_show_current_user_attachments' ); | |
function wpb_show_current_user_attachments( $query ) { | |
$user_id = get_current_user_id(); | |
if ( $user_id && !current_user_can('activate_plugins') && !current_user_can('edit_others_posts | |
') ) { | |
$query['author'] = $user_id; | |
} |
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
//add_action( 'woocommerce_before_single_product', 'add_custom_text_before_product_title' ); | |
add_shortcode( 'scnextprev', 'productnextprev_shortcode' ); | |
function productnextprev_shortcode(){ | |
echo '<div class="prev_next_buttons">'; | |
// 'product_cat' will make sure to return next/prev from current category | |
$previous = next_post_link('%link', '← %title', TRUE, ' ', 'product_cat'); | |
$next = previous_post_link('%link', '%title →', TRUE, ' ', 'product_cat'); | |