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
$.ajax({ | |
cache: false, | |
type: "GET", | |
dataType: "json", | |
url: "[supply the target URL here]", | |
success: function (d) { | |
//do something here | |
} | |
}); |
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
function swap(newView, oldView) { | |
var newView = document.getElementById(newView), | |
oldView = document.getElementById(oldView), | |
viewWrapper = document.getElementById("viewWrapper"); | |
oldView.classList.remove("current-view"); | |
newView.classList.add("current-view"); | |
viewWrapper.appendChild(newView); | |
} |
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
<script id="movie-list-template" type="text/x-handlebars-template"> | |
{{each}} | |
<div> | |
<h1>{{title}}</h1> | |
<img src="{{poster}}" alt="{{title}}"/> | |
</div> | |
{{/each}} | |
</script> |
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
@if (Request. Browser.Type == "IE8" || Request.Browser .Type == "IE7" ){ | |
<img src="~/img/h/apple-touch-icon.png" alt="Love2Dev - Chris Love's Web Development Blog" /> | |
}else{ | |
<div id="heart" ></div> | |
<span class="logo-text" >Love2Dev</ span> | |
} |
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
@media ( max-width:600px) { | |
.main-content { | |
top: 60px ; | |
} | |
.logo { |
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
#heart { | |
position: relative ; | |
margin: 20px 0 0 0 ; | |
height: 60px ; | |
color: #fff ; |
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
<div id="heart" ></div> | |
<span class="logo-text" >Love2Dev</ span> |
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
/* | |
Migrated to: https://github.com/jdarling/Object.observe | |
Tested against Chromium build with Object.observe and acts EXACTLY the same, | |
though Chromium build is MUCH faster | |
Trying to stay as close to the spec as possible, | |
this is a work in progress, feel free to comment/update | |
http://wiki.ecmascript.org/doku.php?id=harmony:observe |
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
<script> | |
var ef = "?_escaped_fragment_="; | |
if (!('querySelector' in document) | |
|| !('localStorage' in window) | |
|| !('addEventListener' in window) | |
|| !('matchMedia' in window)) { | |
if (window.location.href.indexOf("#!") > 0) { |
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
<CodeSnippet Format="1.1.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<Header> | |
<Title>MUSTACHE Template</Title> | |
<Author>Love2Dev</Author> | |
<Shortcut>musttemp</Shortcut> | |
<AlternativeShortcuts> | |
<Shortcut Value="musttemp">must:temp</Shortcut> | |
</AlternativeShortcuts> | |
<Description>Markup snippet for a MUSTACHE Template</Description> | |
<SnippetTypes> |