Skip to content

Instantly share code, notes, and snippets.

View Rakeshbagri's full-sized avatar
💭
You can do everythings

Rakesh Pooja Rakeshbagri

💭
You can do everythings
View GitHub Profile
function hideTdo() {
var timer = null;
var target = document.querySelector('#tidio-chat iframe');
if(!target) {
if(timer !== null) {
clearTimeout(timer);
}
timer = setTimeout(hideTdo, 500);
return;
} else {
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
function enqueue_child_theme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
?>
@Rakeshbagri
Rakeshbagri / .html
Created September 6, 2017 13:10
How to auto call country name which country site open
<div id="hello" class="desktop-6 tablet-6 mobile-3">
<p><img class="contryflag" src="{{ 'earth.png' | file_url }}">{{ settings.hello }} <span id="country-name">Worldwide!</span></p>
</div>
<script>
jQuery.ajax( {
url: '//freegeoip.net/json/',
type: 'POST',
dataType: 'jsonp',
@Rakeshbagri
Rakeshbagri / gist:ad93c79f85ddb2869410473328f8c157
Last active September 5, 2017 11:23
how to autoplay vimeo video use javascript
use player.js and small script code
<script src="https://player.vimeo.com/api/player.js"></script>
<script>
$(document).ready(function(){
var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
player.play();
player.on('play', function() {
alert('played the video!');
@Rakeshbagri
Rakeshbagri / gist:a0b0aae243594b555675ee95a1832026
Created September 5, 2017 07:31
how to set fullscreen vimeo video height and width
use this script
<script>
$(document).ready(function(){
function resize(){
// Load Variables - we do this here so they are reset when the screen changes size.
var SW = $(window).width();
@Rakeshbagri
Rakeshbagri / site-nav.liquid
Last active August 29, 2017 06:42
how to call product list in sub menu
{% for product in collections[child_list_handle].products limit:2 %}
<div>
<a href="{{ url }}">
<div style="background-image: url('{{ product.featured_image | product_img_url: 'large' }}'); width:200px; height:200px; "> </div>
{{ product.title }}
{{ product.price | money_with_currency }}