Guest User

Untitled

a guest
Jun 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #view:
  2. <%= link_to_remote '', :update => 'popUpContent', :url => pub, :html => { :id => pub.id, :title => pub.name, :class => 'pub-link' } %>
  3. <div id="popUpContent"></div>
  4.  
  5. #css:
  6. #popUpContent{ display:none; }
  7.  
  8. #javascript:
  9. jQuery.noConflict();
  10. jQuery(document).ready(function($){
  11. $('.pub-link').click(function(){
  12. $('#popUpContent').show();
  13. });
  14. });
  15.  
  16. #controller:
  17. def show
  18. @pub = Pub.find(params[:id])
  19. render :partial => 'pub', :locals => { :pub => @pub }
  20. end
Add Comment
Please, Sign In to add comment