-
-
Save richardsondx/2305099 to your computer and use it in GitHub Desktop.
Endless page won't work with partial call instead of @render (which display my post with no css style)
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
<% for micropost in @microposts %> | |
<tr> | |
<td class="tdeux"><div class="head1"><%= image_tag("#{ micropost.to_guys ? "guys" : "girl" }-head.png") %></div></td> | |
<td valign="top"><p class="peopleposts"><%= link_to micropost.content, page_path(micropost) %></p></td> | |
<td class="td2"><div class="share1"><%= tweet_button(:via => "hmdy", :url => "http://localhost:3000/pages/#{micropost.id}", :text => "#{@micropost.content}", :lang => "en", :related => "helpmedateyou", :count => "none") %></div></td> | |
</tr> | |
<% end %> |
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
<table> | |
<thead> | |
<tr> | |
<th><h2>Who?</h2><th> | |
<th><h2>What they said?</h2><th> | |
<th><h2></h2><th> | |
<tr> | |
<thead> | |
<div id="microposts"> | |
<tbody> | |
<!-- The tutorial say to render @microposts ; however, I am loosing all the styles when i do that --> | |
<%= render 'microposts'%> | |
<tbody> | |
</div> | |
</table> | |
<%= will_paginate @microposts %> |
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
$('#microposts').append('<%= j render(@microposts %>)'); | |
$('.pagination').replaceWith('<%= j will_paginate(@microposts) %>'); |
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
<% for micropost in @microposts %> | |
<tr> | |
<td class="tdeux"><div class="head1"><%= image_tag("#{ micropost.to_guys ? "guys" : "girl" }-head.png") %></div><td> | |
<td valign="top"><p class="peopleposts"><%= link_to micropost.content, page_path(micropost) %></p><td> | |
<td class="td2"><div class="share1"><%= tweet_button(:via => "hmdy", :url => "http://localhost:3000/pages/#{micropost.id}", :text => "#{@micropost.content}", :lang => "en", :related => "helpmedateyou", :count => "none") %></div><td> | |
</tr> | |
<% end %> |
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
<table> | |
<thead> | |
<tr> | |
<th><h2>Who?</h2><th> | |
<th><h2>What they said?</h2><th> | |
<th><h2></h2><th> | |
<tr> | |
<thead> | |
<div id="microposts"> | |
<tbody> | |
<!-- The tutorial say to render @microposts ; however, I am loosing all the styles when i do that --> | |
<%= render 'microposts'%> | |
<tbody> | |
</div> | |
</table> | |
<%= will_paginate @microposts %> |
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
$('#microposts').append('<%= j render(@microposts %>)'); | |
$('.pagination').replaceWith('<%= j will_paginate(@microposts) %>'); |
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
# Place all the behaviors and hooks related to the matching controller here. | |
# All this logic will automatically be available in application.js. | |
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ | |
# $('#inputtext').limit('140','#charsLeft'); | |
jQuery -> | |
$(window).scroll -> | |
if $(window).scrollTop() > $(document).height() - $(window).height() - 50 | |
$.getScript($('.pagination .next_page').attr('href')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment