Skip to content

Instantly share code, notes, and snippets.

View erezLieberman's full-sized avatar

Erez Lieberman erezLieberman

View GitHub Profile
@erezLieberman
erezLieberman / ie 11 css hacks
Last active August 29, 2015 14:01
ie 11 css hacks
@media all and (-ms-high-contrast:none)
{
*::-ms-backdrop, .divClass {width: 226px;}
}
@erezLieberman
erezLieberman / the CSS
Created May 25, 2014 13:47
css3&jquery page loader
.continer{
@include opacity(0);
@extend %trans;
&.on{
@include opacity(1);
}
}
.spinner {
@erezLieberman
erezLieberman / coolSass.scss
Created June 13, 2014 09:52
Cool SASS Mixins & Functions
//Sassy Z-Index Management For Complex Layouts
$elements: project-covers, sorting-bar, modals, navigation;
.project-cover {
z-index: index($elements, project-covers);
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
@erezLieberman
erezLieberman / child-theme.js
Last active December 1, 2015 13:54
child theme - starting point
(function($) {
$(document).ready(function(){
alert("wow it's work!!!");
// view the entire object of PHP variables
console.dir(ourPhpVariables);
// retrieve the site name from the object
var siteName = ourPhpVariables.siteName;
@erezLieberman
erezLieberman / gist:f2ac621fefbac7219abd
Last active August 21, 2017 15:09
embed video to wp acf
<div class="videoWrapper">
<!-- from here: http://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php -->
<?php if( get_field('youtube_url') ){
$embed_code = wp_oembed_get( get_field('youtube_url') );
echo $embed_code;
} ?>
</div>
@erezLieberman
erezLieberman / theme.js
Last active August 29, 2015 14:10
theme.js
(function($) {
$(document).ready(function(){
alert("wow it's work!!!");
//end of document).ready function
});
$( window ).load( function(){
//end of window.load function
@erezLieberman
erezLieberman / svg_acf_image.php
Created December 16, 2014 10:58
allow svg in acf image field
<?php $image = get_sub_field('features_img');
if( !empty($image) ):
// vars
$url = $image['url'];
$title = $image['title'];
$alt = $image['alt'];
$caption = $image['caption'];
//disable the submit btn when input field empty
$('input.search-field').mousemove(function() {
var empty = false;
$('.search-field').each(function() {
if ($(this).val().length == 0) {
empty = true;
}
});
@erezLieberman
erezLieberman / gist:61b75b79fb51da94efcb
Created February 24, 2015 11:38
wp the_excerpt() by charcters
<?php echo substr(get_the_excerpt(), 0,30); ?>
@erezLieberman
erezLieberman / if cf7 sent mail
Created February 25, 2015 21:29
if cf7 sent mail
$( document ).ajaxComplete(function( event,request, settings ) {
if($('.sent').length > 0){
console.log('good');
}else{
console.log('bad');
}
});