开发者

Rails Jquery - Metasearch page reload problem

I am using metasearch. I have created a form with checkboxes and each time a checkbox is changed the form is submitted and the page reloads.

The problem is that Jquery forget the state of the checkbox and some content that should appear is hidden.

See my Jquery code and html here: Help removing class with c开发者_开发技巧heckbox


If the page reloads and you want to mantain the state (in this case, keep checkboxes clicked), you'll have to pass this info onto the next page.

jQuery is stateless, it doesn't keep or cache any info between requests.


I solved my problem with setting render :layout => false when the url got params and did make an ajax request instead and moved my menu to my layout file

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜