Skip to content

Instantly share code, notes, and snippets.

View danishiqbal4's full-sized avatar

Sheikh Danish Iqbal danishiqbal4

View GitHub Profile
@danishiqbal4
danishiqbal4 / IntlTelInput
Created April 18, 2021 11:05
IntlTelInput Init
$(document).ready(function()
{
var input = document.querySelector("#phoneNumber");
var iti = window.intlTelInput(input, {
utilsScript:'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.0/js/utils.js',
initialCountry:"auto",
separateDialCode:true,
dropdownContainer:null,
geoIpLookup: function (callback) {
$.get({url:"https://ipinfo.io",cache:true}, function () {}, "jsonp").always(function (resp) {
@danishiqbal4
danishiqbal4 / SkyVergeHTMLFile.html
Last active March 3, 2020 07:26
A Gist for Sky Verge PHP Engineer HTML/JS file.
<!-- Below I have added comments to explain -->
<!-- Also, my new solution is in a code pen: https://codepen.io/danishiqbal4/pen/jOPLMNV -->
<html>
<head>
<script>
// If not necessary for some reason, there is no need to delay the function for 10 ms.
setTimeout(
function() {
// variable declaration missing for "todos". Not declaring a variable will set it's scope to global which is unecessary
todos = document.getElementsByTagName( 'li' );
@danishiqbal4
danishiqbal4 / SkyVergePHPFile.php
Last active March 3, 2020 07:01
A Gist for Sky Verge PHP Engineer
<?php
/**
* This code retrieves course data from an external API and displays it in the user's
* My Account area. A merchant has noticed that there's a delay when loading the page.
*
* == What changes would you suggest to reduce or remove that delay? ==
*/
public function add_my_courses_section() {
global $current_user;
@danishiqbal4
danishiqbal4 / CF7-Jupiter CF-Outline Style - Light.txt
Created May 11, 2018 11:03
Contact Form 7 HTML code to look like the default Jupiter contact form - Outline Style - Light
<!-- HTML -->
<div class="mk-contact-form-wrapper s_contact outline-style s_outline contact-light light">
<div class="mk-form-row">
<div class="mk-form-full s_form-all">[text* your-name class:text-input class:s_txt-input placeholder "Your Name"]</div>
</div>
<div class="mk-form-row">
<div class="mk-form-full s_form-all">[email* your-email class:text-input class:s_txt-input placeholder "Your Email"]</div>
</div>
<div class="mk-form-row">
<div class="mk-form-full s_form-all">[text your-subject class:text-input class:s_txt-input placeholder "Your Subject"]</div>
@danishiqbal4
danishiqbal4 / CF7-Jupiter CF-Outline Style - Dark.txt
Last active May 11, 2018 11:03
Contact Form 7 HTML code to look like the default Jupiter contact form - Outline Style - Dark
<!-- HTML -->
<div class="mk-contact-form-wrapper s_contact outline-style s_outline contact-dark dark ">
<div class="mk-form-row">
<div class="mk-form-full s_form-all">[text* your-name class:text-input class:s_txt-input placeholder "Your Name"]</div>
</div>
<div class="mk-form-row">
<div class="mk-form-full s_form-all">[email* your-email class:text-input class:s_txt-input placeholder "Your Email"]</div>
</div>
<div class="mk-form-row">
<div class="mk-form-full s_form-all">[text your-subject class:text-input class:s_txt-input placeholder "Your Subject"]</div>
@danishiqbal4
danishiqbal4 / components-full.6.1.1.js
Last active March 26, 2018 09:20
Advanced Google Maps element issue with Jupiter theme
(function($) {
'use strict';
var _toBuild = [];
MK.component.AdvancedGMaps = function(el) {
var $this = $(el),
container = document.getElementById( 'mk-theme-container' ),
data = $this.data( 'advancedgmaps-config' ),
apikey = data.options.apikey ? ('key='+data.options.apikey+'&') : false,