-
-
Save richardsondx/2511266 to your computer and use it in GitHub Desktop.
This is what I've done
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 %> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$(".slidingDiv<%= micropost.id %>").hide(); | |
$(".show_hide<%= micropost.id %>").show(); | |
$('.show_hide<%= micropost.id %>').click(function(){ | |
$(".slidingDiv<%= micropost.id %>").slideToggle(); | |
}); | |
}); | |
</script> | |
<%= link_to image_tag('Comment.png', :mouseover => "Comment-Over.png", :class => "show_hide"), "#" %> | |
<div class="slidingDiv<%= micropost.id %>"> | |
<%= render :partial => 'microposts/display', :locals => { :micropost => @micropost } %> | |
<a href="#" class="show_hide<%= micropost.id %>">hide</a> | |
<% end %> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment