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
.square { | |
//width within the parent | |
width: 100%; | |
&:before { | |
content: ""; | |
float: left; | |
//essentially the aspect ratio. 100% means the | |
//div will remain 100% as tall as it is wide, or | |
//square in other words. | |
padding-bottom: 100%; |
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
<html lang="en" ng-controller="AppController" ng-keyup="keyup($event)"> | |
var AppController = function($scope) { | |
$scope.keyup = function(keyEvent) { | |
console.log('keyup', keyEvent); | |
}; | |
}; |
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
/* | |
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/ | |
*/ | |
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} |
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
ERROR 2014-01-13 20:47:23,637 base 5337 140188056676096 Internal Server Error: /account/profileCancelPlanRenew/ | |
Traceback (most recent call last): | |
File "/persistent/dramafever/.virtualenvs/df/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response | |
response = callback(request, *callback_args, **callback_kwargs) | |
File "/persistent/dramafever/.virtualenvs/df/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view | |
return view_func(request, *args, **kwargs) | |
File "/persistent/dramafever/trunk/dramafever/main/views.py", line 1101, in plan_cancel_renew_view | |
next_billing_period_amount, discount_amount = userSubs.get_deter_cancel_discount_info() | |
File "/persistent/dramafever/trunk/dramafever/premium/models.py", line 1472, in get_deter_cancel_discount_info | |
sub = braintree.Subscription.find(self.subscription_id) |
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
PL.maps = (function(){ | |
var map, | |
geoData; | |
var init = function(mapId,options){ | |
var div = document.getElementById(mapId); | |
map = new google.maps.Map(div, options); | |
return map; |
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 $j = jQuery.noConflict(); | |
$j(document).ready(function(){ | |
ms.header.init(); | |
ms.home.init(); | |
ms.footer.init(); | |
}); // end of document ready | |
/* ------------------------------------------ | |
* Project Namespace |
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
<!doctype html><!-- simplified doctype works for all previous versions of HTML as well --> | |
<!-- Paul Irish's technique for targeting IE, modified to only target IE6, applied to the html element instead of body --> | |
<!--[if lt IE 7 ]><html lang="en" class="no-js ie6"><![endif]--> | |
<!--[if (gt IE 6)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]--> | |
<head> | |
<!-- simplified character encoding --> | |
<meta charset="utf-8"> |
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 jqxhr = $j.ajax({ | |
type: 'post', //post or get | |
url: cartUrl, | |
//dataType: 'json', //if necessy | |
data: { product : pid, qty: 1, isAjax: 1 } // Important!! | |
}).done(function(data){ | |
//console.log(data.status); | |
if ( data.status == "SUCCESS") { | |
// do something... | |
} |
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
// On window scrolling | |
$j(window).scroll(function(){ | |
// update the ruler's color based on scroll position | |
var docHeight = $j(document).height(); | |
var scrollTop = $j(window).scrollTop(); | |
var currPos = scrollTop/docHeight*100; | |
//console.log( currPos + "%"); | |
if( (currPos > 13 && currPos < 21) || currPos > 64 ) { | |
//do something in between 13% and 21% and grater than 64% | |
} else { |
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
setTimeout( "window.location = '../yourpath/yourdestination?" + params +"';" , 3000); |
NewerOlder