2

使用 Rails 3.2 和 Colorbox。我有以下内容:

<%= link_to image_tag(photo.data.url(:picture_thumb), :alt => '', :title => ''),
 photo.data.url(:picture_lightbox),
 :class => "gallery",
 :"data-title" => %(
   #{link_to("Delete",
     spot_photo_path(@spot, photo),
     :method => :delete,
     :confirm => "Are you sure you want to delete this picture? Your unsaved changes will be lost.", :class => "delete_photo")}
 )
%>

$(".gallery").colorbox({
  rel: "gallery",
  width: "95%",
  height: "95%",
  current: "{current} of {total}",
  title: function() { 
    return $(this).data("title");
  }
});

当我单击链接时,出现以下许多错误:

Uncaught RangeError: Maximum call stack size exceeded.

我真的找不到解决方法吗?

4

0 回答 0