jquery onclick function not firing with rails link_to_remote
- by RahTha
In the js file of the page, inside $(document).ready(function() {} i have 
$(".school a").live("click", function (e){ 
  e.preventDefault();
  ....;
  jsFunc(param1, param2, param3);
 });
Now the div with the class school has  tags generated by rails link_to_remote with :url, :action, :before, :html. 
On clicking on this link it does all that it should do with regards to link_to_remote, but somehow the onclick event in the document.ready does not attach to it. Why would this be happening? The jsFunc all it does is post to a url async-ly, i figured out that stuffing that post url in the :before of the link_to_remote would work - but is there a more elegant way of just being able to use the attach functionality