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
$aliceblue : #f0f8ff | |
$antiquewhite : #faebd7 | |
$aqua : #00ffff | |
$aquamarine : #7fffd4 | |
$azure : #f0ffff | |
$bisque : #ffe4c4 | |
$black : #000000 | |
$blanchedalmond: #ffebcd | |
$blue : #0000ff | |
$blueviolet : #8a2be2 |
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
let backg = document.getElementById('content3');//any place you want to display the color | |
const colors = document.querySelector('.colors'); //just a P to show the color HEX code | |
function createColor() { | |
const randl = Math.random().toString(16).substr(2, 6); | |
let color = `#${randl}`; | |
colors.innerHTML = color; | |
backg.style.backgroundColor = color; | |
} | |
createColor(); |
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
$perano: #a5b4ed | |
$morning-glory: #a7e0da | |
$gum-leaf: #B5D6C1 | |
$kidnapper: #E0E7CD | |
$french-lilac: #F0DAF5 | |
$moon-raker: #D7BCEF | |
$jordy-blue: #9AB3F7 | |
$prim: #F6EEF3 | |
$shadow-green: #A3CEC6 | |
$thatch: #B7A096 |
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
$.getJSON("https://api.openweathermap.org/data/2.5/weather?id=4614214&units=imperial&APPID=openweathermap api code", function(data) { | |
var icon = "http://openweathermap.org/img/w/" + data.weather[0].icon + ".png"; | |
var temp = Math.floor(data.main.temp); | |
var weather = data.weather[0].description; | |
var humid = data.main.humidity; | |
var windspeed = data.wind.speed + " mph"; | |
var deg = Math.floor(data.wind.deg); | |
switch (true) { | |
case deg >= 360 && deg <= 21: | |
deg = "N"; |
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
$(function () { | |
$('li.inliner').on('click', function () { //click on the li | |
var content = $(this).text();//content is the text that you clicked on | |
//PLACE THE TEXT INSIDE THE INPUT FIELD, YOU CAN CHANGE YOUR SELECTOR TO TARGET THE RIGHT INPUT | |
$('input[name="art"]').val(content); | |
}); | |
}); |
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
<?php | |
foreach(->query('SELECT * FROM table') as $row) { | |
echo $row['field1'].' '.$row['field2']; //etc... | |
} |
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
#ajax can be any form ID or class name. I just use ajax | |
$('form#ajax').on('submit', function(){ | |
var that = $(this), | |
url = that.attr('action'), | |
type = that.attr('method'), | |
data = {}; | |
that.find('[name]').each(function(index, value){ | |
var that = $(this), | |
name = that.attr('name'), |
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
$months = [ | |
'January', | |
'February', | |
'March', | |
'April', | |
'May', | |
'June', | |
'July', | |
'August', | |
'September', |