I Have used Ajax and JQuery link to enable new and close functionality
problem scenario:
* While using ajax link to open the new content and closing the same
using Jquery link its working fine wherein the same does not happen
again while we try to open the new content immediately after closing the
"New content"
* The above said works fine only while we refresh the page
How to resolve it ?
For example
<%= link_to_remote (''New'', :url =>
new_expense_expense_session_path,:update=>"expense_session_new_edit_content")
%>
<div id="expense_session_new_edit_content"></div>
<a href=''#''
id=''close_session''>close</a>
<script type="text/javascript">
$(document).ready(function() {
$(''a#close_session'').click(function(){
       
$(''#expense_session_new_edit_content'').fadeOut("1000");
    })
});
</script>
-- 
Posted via http://www.ruby-forum.com/.
-- 
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
This sounds more like a jQuery question then a Rails one, but let''s see
if I can help anyway. So, you click a link, something happens, then the 
div hides. You click the link again, something happens, and the div 
shows up?
<div id="some_div_toggle">With stuff in it</div>
<a href="#" id="some_link_to_click">To toggle
div</a>
$(function() {
  $(''#some_link_to_click'').click(function() {
    $.ajax({
      type: ''get'',
      dataType: ''json'',
      success: function(data) {
        //do stuff with data
       
if($(''#some_div_toggle'').is('':hidden'')) {
          //show the div
        } else {
          //hide the div
        }
      }
    });
  });
});
-- 
Posted via http://www.ruby-forum.com/.
-- 
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.