link_to_remote and jquery accordion
- by badnaam
I have a standard jquery ui accordion and I load content into it using a link_to_remote tag (in the accordion header). All this works fine. The problem is, once the content is loaded, I dont want a ajax call, I just want the accordion to fold, like it should normally do. I tried doing this using the following jquery but clicking the header hence the link still makes a request.
#lbs_list is the div inside the accordion.
$j('#lnk_show_benefit').bind('click', function(e) {
if ($j('#lbs_list').is(':visible')) {
e.preventDefault();
return false;
} else {
return true;
}
});