Skip to content

Instantly share code, notes, and snippets.

@vidmantas
Created May 26, 2010 09:48
Show Gist options
  • Save vidmantas/414293 to your computer and use it in GitHub Desktop.
Save vidmantas/414293 to your computer and use it in GitHub Desktop.
%tr.fields
%td
= f.collection_select :product_id, Product.all, :id, :name
%td#price_unit
:javascript
$(function (){
new_id = $("#price_unit").prev("td").next("select").attr("class");
alert(new_id);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment