Created
December 17, 2014 10:50
-
-
Save cole007/0bf70bfaf73c93b56ad7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!-- from page being fetched --> | |
<div class="page-content"> | |
<h1>here is some content on the case-study page</h1> | |
</div> |
This file contains hidden or 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
<!-- response from static HTML prototype --> | |
<!-- success - console log returns relevant object --> | |
[div.page-content, prevObject: x.fn.x.init[35], context: undefined, selector: ".page-content", jquery: "1.10.2", constructor: function…] |
This file contains hidden or 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
<!-- response from CMS implementation --> | |
<!-- failure - console log returns object but undefined if try to access --> | |
[prevObject: x.fn.x.init[62], context: undefined, selector: ".page-content", jquery: "1.10.2", constructor: function…] |
This file contains hidden or 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
// url = path to page being fetched | |
function doAdjacent(url,dir) { | |
$.get( url, function( data ) { | |
console.log($(data).find('.page-content')); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try checking that data is the same in both contexts, if you change
console.log($(data).find('.page-content'));
toconsole.log(data)
what results do you get?