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() | |
{ | |
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) { |
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
<!-- 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' ); |
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 | |
/** | |
* 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; |
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
<!-- 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> |
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
<!-- 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> |
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($) { | |
'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, |