Skip to content

Instantly share code, notes, and snippets.

@ejke
ejke / jquery.js
Created April 13, 2017 10:21
Equalise li elements
//function to equalise li.person elemenets, no matter the content.
// Shorthand for $( document ).ready()
$(function() {
console.log( "ready! and equalise." );
var maxHeight = 0;
$("li").each(function(){
if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
});
$("li").height(maxHeight);
});
@ejke
ejke / css-mobile-first-783px-min.css
Created April 12, 2017 15:30
WP admin bar + sticky header query
@media screen and ( min-width: 783px ) {
.admin-bar .site-header {
top: 32px;
}
}
@ejke
ejke / jquery.js
Created April 12, 2017 15:30
WP admin bar + sticky header js
var $document = $(document),
$header = $('.admin-bar .site-header');
if($(window).width() < 601) {
$document.scroll(function() {
if ($document.scrollTop() >= 46) {
// user scrolled 46 pixels or more;
$header.css({"top": "0"})
} else {
.admin-bar .site-header {
top: 46px;
}
@ejke
ejke / css-mobile-first-0-600.css
Created April 12, 2017 15:27
WP admin bar + sticky header
.admin-bar .site-header {
top: 46px;
}
@ejke
ejke / supply-second.html
Last active February 9, 2017 09:58
Ionic2: send data to subpages and sub-subpages
<ion-header>
<ion-navbar>
<ion-title *ngIf="selectedVarud">
{{selectedVarud.title}}</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<ion-list-header class="list-header-margin">Jook</ion-list-header>
@ejke
ejke / home.html
Created February 8, 2017 13:37
Ionic2 dynamically change links with ngFor
<ion-grid>
<ion-row>
<ion-col width-33 *ngFor="let info of infos">
<div class="instructions" [navPush]="info.tap">
<div>
<img src="assets/icons/{{info.icon}}.png" alt="Icon">
</div>
<span>{{info.title}}</span>
</div>
</ion-col>