Window Height:
Element Height:
<h2>Resize the window to see it working!</h2> | |
<div id="test"> | |
<div class="log margin-10-bottom">Window Height: </div> | |
<div class="log1 margin-10-bottom">Element Height: </div> | |
</div> |
<div class="pricing-table clearfix"> | |
<ul class="highlight-low"> | |
<li class="heading">Free</li> | |
<li class="price">$0/mo</li> | |
<li class="feature"><span>Some feature</span></li> | |
<li class="feature"><span>Some feature</span></li> | |
<li class="feature"><span>Some feature</span></li> | |
<li class="feature"><span>Some feature</span></li> | |
<li class="feature"><span>Some feature</span></li> | |
<li class="call-to-action">Buy Now</li> |
function serialize(obj) { | |
var str = []; | |
for (var p in obj) { | |
if (angular.isArray(obj[p])) { | |
for (var i = 0; i < obj[p].length; i++) { | |
str.push(encodeURIComponent(p) + "[]=" + obj[p][i]); | |
}; | |
} | |
if (obj.hasOwnProperty(p) && !angular.isArray(obj[p])) { | |
// str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); |
.directive('prettyp', function(){ | |
return function(scope, element, attrs) { | |
$("[rel^='prettyPhoto']").prettyPhoto({deeplinking: false, social_tools: false}); | |
} | |
}) |
A Pen by Mohit Aneja on CodePen.
A Pen by Mohit Aneja on CodePen.
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
#test{ | |
background: #222; | |
color: #fff; |
add_filter('author_rewrite_rules', 'no_author_base_rewrite_rules'); | |
function no_author_base_rewrite_rules($author_rewrite) { | |
global $wpdb; | |
$author_rewrite = array(); | |
$authors = $wpdb->get_results("SELECT user_nicename AS nicename from $wpdb->users"); | |
foreach($authors as $author) { | |
$author_rewrite["({$author->nicename})/page/?([0-9]+)/?$"] = 'index.php?author_name=$matches[1]&paged=$matches[2]'; | |
$author_rewrite["({$author->nicename})/?$"] = 'index.php?author_name=$matches[1]'; | |
} | |
return $author_rewrite; |
let typingTimer; //timer identifier | |
let doneTypingInterval = 1500; //time in ms, 5 second for example | |
let $input = $('.search-sidebar-ui-blocks'); | |
//on keyup, start the countdown | |
$input.on('keyup', function () { | |
clearTimeout(typingTimer); | |
typingTimer = setTimeout(doneTyping, doneTypingInterval); | |
}); |