Extract variables from href link

I’m just trying to pop up a modal with a couple of variables passed in from an href link.

  <a href="#" id="modal_customer_notes" shipno = "<%= note.shipmentno_id  %>" note = "<%= note.notes  %>" data-target="#modal_show_notes" data-toggle="modal">
                        <%= Shipment.find( note.shipmentno_id).shipment_number  %>

i see the right value for shipno and note, but how do i use them in a modal? Can I use a jquery selector?