Skip to content

Instantly share code, notes, and snippets.

View JHethDev's full-sized avatar
🏠
Working from home

JHethDev

🏠
Working from home
View GitHub Profile
@JHethDev
JHethDev / Btn.svelte
Created April 16, 2020 21:32
Sapper localStorage Example
<script>
import { country } from '../stores/local-store.js;
export let location;
function setCountry(value) {
// We can use this here because _layout calls useLocalStorage for country.
// If you have multiple variables to store each will need to be called
// in the same way in the _layout file.
country.set(value);
}
@JHethDev
JHethDev / Divi-slide-menu-helper.html
Last active August 6, 2019 19:56 — forked from lots0logs/epanel-integration-body.html
WordPress :: Divi Theme :: Slide-Out Navigation :: Close menu when any link is clicked or main content area is clicked while slide menu is open
<script>
var closeDelay = 100;
(function($) {
$(window).load(function() {
setTimeout(function() {
$('#main-content, .et_pb_fullscreen_nav_container a').each(function() {
$(this).click(function() {
setTimeout(function() {
if ($('.et_pb_slide_menu_opened').is(':visible')) {