This file contains 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
import React, { useState, useEffect } from 'react'; | |
export class GeoService { | |
public pos: any; | |
public getPosition() { | |
navigator.geoLocation.getCurrentPosition((position) => { | |
this.pos = position; | |
}); | |
} |
This file contains 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
How to disable a link using only CSS? | |
.not-active { | |
pointer-events: none; | |
cursor: default; | |
text-decoration: none; | |
color: black; | |
} | |
<a href="link.html" class="not-active">Link</a> |
This file contains 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
"use strict"; | |
(function () { | |
var showHideJobFilter = function () { | |
if ($(window).width() < 801 && !$('#refine-search-box-inner').hasClass("mobile-active")) { | |
$('#refine-search-box-inner').addClass('mobile-active').css({ 'display': 'none' }); | |
} | |
else if ($(window).width() >= 801 && $('#refine-search-box-inner').hasClass("mobile-active")) { | |
$('#refine-search-box-inner').removeClass('mobile-active').css({ 'display': 'none' }); | |
} |
This file contains 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
https://github.com/neilkennedy/HackerSharp | |
https://hackernews.api-docs.io/v0/overview/introduction | |
https://hackernews.api-docs.io/v0/overview/introduction |
This file contains 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
"use strict"; | |
(function () { | |
var theWindow = $(window); | |
var bg = $('.img-fluid_jsfit'); | |
var aspectRatio = bg.width() / bg.height(); | |
var resizeBg = function () { |
This file contains 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
// Write your JavaScript code. | |
// js for google capcha | |
function onSubmit(token) { | |
alert('thanks ' + document.getElementById('field-submitcv').value); | |
} | |
function validate(event) { | |
event.preventDefault(); | |
if (!document.getElementById('field-submitcv').value) { |
This file contains 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
const app = document.getElementById('root-rev'); | |
const logo = document.createElement('img'); | |
logo.src = '~/../images/app/google logo.png'; | |
logo.className = 'img-fluid'; | |
logo.width = '80'; | |
logo.alt = "Google"; | |
const txt = document.createElement('span'); | |
txt.className = 'pl-1'; |
This file contains 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
if (elem.offstHeight <500){ | |
divs.forEach(function(elem, index, arr){ | |
elem.style.maxHeight = '100vh'; | |
}) | |
} |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |