How to enable div that was hide using JQuery

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 ?

My code
<%= link_to_remote (‘New’, :url =>
new_expense_expense_session_path,:update=>“expense_session_new_edit_content”)
%>

close

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?

With stuff in it

To toggle div

$(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
}
}
});
});
});