Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input class="string required brand_xref_catalog_brand ui-autocomplete-input"
- data-id="824" required="required" aria-required="true" type="text"
- name="brand_xref[catalog_brand]" id="brand_xref_catalog_brand"
- autocomplete="off">
- $(".brand_xref_catalog_brand").autocomplete
- source: (request, response) ->
- options =
- term: request.term
- $.get "/search_catalog_brands", options, (data) ->
- if data.length == 0
- alert "No brands found that contain with " + request.term + "."
- response data
- minLength: 3
- select: (event, ui) ->
- $("#brand_xref_catalog_brand_id").val(ui.item.id)
- $(this).data('id')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement