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 loadFlickr(flickrid) | |
{ | |
$('#feed').html('<span><img src="/blog/images/lightbox-ico-loading.gif" alt=""></span>'); | |
$.ajax({ | |
type:'GET', | |
url:"http://api.flickr.com/services/feeds/photos_public.gne", | |
data:"id="+flickrid+"&lang=en-us&format=json&jsoncallback=?", | |
success:function(feed) { | |
// Do something with the response | |
}, |
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
<?php $href = is_front_page() ? 'class="scrolly" href="' : 'href="/'; ?> | |
<ul> | |
<li><a <?php echo $href; ?>#about"> about copter </a></li> | |
<li><a <?php echo $href; ?>#process"> our process </a></li> | |
<li><a <?php echo $href; ?>#work"> our work </a></li> | |
<li><a <?php echo $href; ?>#start"> get started </a></li> | |
</ul> |
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 jason = { | |
"age" : "24", | |
"hometown" : "Missoula, MT", | |
"gender" : "male" | |
}; |
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
document.write('Jason is ' jason.age); // Output: Jason is 24 | |
document.write('Jason is a ' jason.gender); // Output: Jason is a male |
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 family = [{ | |
"name" : "Jason", | |
"age" : "24", | |
"gender" : "male" | |
}, | |
{ | |
"name" : "Kyle", | |
"age" : "21", | |
"gender" : "male" | |
}]; |
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
document.write(family[1].name); // Output: Kyle | |
document.write(family[0].age); // Output: 24 |
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 family = { | |
"jason" : { | |
"name" : "Jason Lengstorf", | |
"age" : "24", | |
"gender" : "male" | |
}, | |
"kyle" : { | |
"name" : "Kyle Lengstorf", | |
"age" : "21", | |
"gender" : "male" |
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
document.write(family.jason.name); // Output: Jason Lengstorf | |
document.write(family.kyle.age); // Output: 21 | |
document.write(family.jason.gender); // Output: male |
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
[Exception... "Access to restricted URI denied" code: "1012" | |
nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" | |
location: "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js Line: 19"] |
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( | |
type:'GET', | |
url:"http://example.com/users/feeds/", | |
data:"format=json&id=123", | |
success:function(feed) { | |
document.write(feed); | |
}, | |
dataType:'jsonp' | |
); |