English 中文(简体)
页: 1 Query-Face Box - Popup is not work after repaint from AJAX
原标题:jQuery-Facebox - Popup is not working after repaint from AJAX

我的网页上有一套链接,我附上了面对面的“ j”功能,这样,只要有链接,就会有一只冰pop。

<a href="coach_selector_popup?day=<%= day %>&hour=<%= hour %>" rel="facebox">

下面是我用于面罩的文字。

<script type="text/javascript">
  jQuery(document).ready(function($) {
    jQuery( a[rel*=facebox] ).facebox()
  })
</script>

以上是工作罚款。 但是,当我再次对一些日本宇宙航空研究开发机构的呼吁作出回应时,这一功能正在消失,也就是说,当我点击这个链接时,我被转往一页而不是一面箱。

我知道,我需要做些什么,才能使我看到正确的方向?

<><>Edit>: 我这样做是为了让我的控制者部分地这样做。

render(:partial => "grid_item" , :locals => {:day=>d, :hour=>h)
最佳回答

包括你在你部分提到的 j印法。 我猜测,在装货时将再次执行。 我无法确定该文件。 在部分更新后,即可启动现成的活动,但我想这是。

假设你使用<代码>link_to_remote 或者类似的话,你也可以使用<代码>:complete 或:succes备选办法添加你的javascript callsback,例如:

link_to_remote get_icon( remove ), 
   :url => {:action => "your_action", :id => @record},
   :success => "jQuery( a[rel*=facebox] ).facebox();" , 
   :failure => "alert( It failed? )"

希望!

问题回答

页: 1





相关问题
rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Auth-code with A-Za-z0-9 to use in an URL parameter

As part of a web application I need an auth-code to pass as a URL parameter. I am currently using (in Rails) : Digest::SHA1.hexdigest((object_id + rand(255)).to_s) Which provides long strings like : ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

activerecord has_many :through find with one sql call

I have a these 3 models: class User < ActiveRecord::Base has_many :permissions, :dependent => :destroy has_many :roles, :through => :permissions end class Permission < ActiveRecord::...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签