title | date | description | keywords |
---|---|---|---|
First article |
2019-09-10 |
This is the first article |
first, awesome, article |
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
var stringOne = "Hey there, how are you doing?", | |
stringTwo = "I'm doing great, thank you!"; | |
// charAt() → it outputs the indicated index | |
console.log(stringOne.charAt(0)); | |
// charCodeAt() → it returns the unicode number | |
console.log(stringOne.charCodeAt(0)); | |
// concat() → it concatenates two or more strings |
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
// cart simulation | |
$('#emptyCartWarningContainer').toggleClass('displayNone'); | |
$('.flexibleCartContent').toggleClass('displayNone'); | |
$('ul.mainCartSections').toggleClass('displayNone'); | |
$('ul.mainCartSections > li > a').toggleClass('displayNone'); | |
// Script controlling cart's scrollbar | |
var myUl = $('#mini-shopping-cart > ul'); | |
var timeout = null; |
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
Centering in CSS: A Complete Guide | |
1. Horizontally | |
- Is is inline or inline-* elements (like text or links)? | |
-> You can center inline elements horizontally, within a block-level parent element, with just: | |
.center-children { | |
text-align: center; | |
} | |
This will work for inline, inline-block, inline-table, inline-flex, 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
var anchored = false, | |
bodyH = document.querySelector('body').offsetHeight, | |
footerH = document.querySelector('footer').offsetHeight, | |
indexadv = document.querySelector('.indexadv'), | |
indexadvH = indexadv.offsetHeight; | |
var indexadvFixedBottom = indexadv.getBoundingClientRect().bottom; | |
var breaking = bodyH - indexadvFixedBottom - footerH - 35; | |
var indexadvTop = bodyH - footerH - indexadvH; | |
window.onscroll = 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
// Adding jquery: | |
// <script type="text/javascript" src="jquery.js"></script> | |
// Select elements with $() | |
// Use .css() to style elements | |
$("nameOfSelector") | |
// Selecting with jQuery is very similar to querySelectorAll |
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
var helpTip = document.getElementsByClassName("help-tip")[0]; | |
var minCart = document.getElementById("min-cart"); | |
helpTip.onclick = function() { | |
minCart.style.display = "block"; | |
for (var i = 0; i < minCart.children.length; i++) { | |
minCart.children[i].style.display = "block"; | |
} | |
} | |
function () { | |
minCart.style.display = "block"; |
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
<!-- Title & Image Slider --> | |
<div class="container"> | |
<div id="titleDiv"> | |
<div id="title"> | |
<img id="heartImg" src="images/brand-heart-icon.png"> | |
<h2 id="brandTitle">Best Seller 品牌館<span id="burger"> | |
<a href="#" data-am-offcanvas="{target: '#menu'}" class="am-menu-toggle"> | |
<i class="am-menu-toggle-icon am-icon-reorder"></i> | |
</a> | |
</span></h2> |
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
/*Image Slider Div (brand.html)*/ | |
.container { | |
margin: 0; | |
} | |
#titleDiv { | |
display: block; | |
margin: 0 auto; |
NewerOlder