Skip to content

Instantly share code, notes, and snippets.

View slimelbasti's full-sized avatar

slim basti slimelbasti

View GitHub Profile
<?php $loop = new WP_Query( array( 'post_type' => 'course_feature', 'orderby' => 'post_id', 'order' => 'ASC' ) ); ?>
<?php while ( $loop->have_posts() ): $loop->the_post(); ?>
<div class="col-sm-2">
<i class="<?php the_field( 'course_features_icon' ); ?>"></i>
<h4><?php the_title(); ?></h4>
</div>
<?php endwhile; ?>
var render = function () {
$('.innovation-index').each(function () {
var spaceKey = $(this).find('.innovation-spacekey').first().val();
var labels = $(this).find('.innovation-labels').first().val().split(',');
var baseURL = $(this).find('.innovation-baseurl').first().val();
var descriptionField = $(this).find('.innovation-descriptionField').first().val();
var $overlay = jQuery('<div id="overlay"></div>');
var $image = jQuery("<img src='<%= article.getDataImage() %>'>");
$overlay.append($image);
jQuery("body").append($overlay);
jQuery("#agirc-thumb").click(function(event){
event.preventDefault();
$overlay.show();
});
$overlay.click(function(){
$overlay.hide();
/**
* Created by SBasti on 6/15/2017.
*/
var express = require ('express');
var app = express();
app.get('/',function(req,res) {
res.send('Hello Express');
});
app.get('/me',function(req,res){
res.send('planet');
@slimelbasti
slimelbasti / app.js
Created June 16, 2017 12:42
part 2 node
/**
* Created by SBasti on 6/15/2017.
*/
var express = require ('express');
var app = express();
app.set('view engine','ejs');
app.locals.pagetitle = "awesome website";
app.get('/',function(req,res) {
$(document).on('click', 'A.clickMe', function(event){
$.console.log('Hello World');
});
var equalizeHeights = function () {
$(".equalizer").each(function(ix, el) {
var heights = $(el).find('.eq-watch').map(function() {
return $(this).height();
}).get();
maxHeight = Math.max.apply(null, heights);
@slimelbasti
slimelbasti / equalize.js
Created May 4, 2017 13:08
height equalize function
var equalizeHeights = function () {
$(".equalizer").each(function(ix, el) {
var heights = $(el).find('.eq-watch').map(function() {
return $(this).height();
}).get();
maxHeight = Math.max.apply(null, heights);
$(el).find('.eq-watch').height(maxHeight);
});
};