id attribute partial problem in tab

I have used JavaScript Tabifier automatically create an html css tabs interface in my rails view. My problem is when I place a partial in the second tab I lose access to the global attribute for reference purposes with the draggable_element.

<% for pdf in @article.pdfs %>   <%= image_tag pdf.title,       :style => "vertical-align: middle",       :id => "#{}_#{}",       :class => "attached_pdf" %>

  <%= draggable_element "#{}_#{}", :revert => true %> <% end %>

If I use "#{@article.title}_#{}" for the image_tag :id and draggable_element id it works without problem. If I place the render partial call in the first tab it works without problems..

Any ideas?

The problem was the :id was not unique and clashed with other draggable attachments on different tabs.

By adding a unique string to the beginning of the id solved the problem:

:id => "pdflibrary_#{}_#{}"