Skip to content

Commit

Permalink
Added support for inputs that are dynamically inserted into the DOM a…
Browse files Browse the repository at this point in the history
…fter page-load.
  • Loading branch information
lifo101 committed Jul 22, 2013
1 parent 405786b commit e689e3f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Resources/public/js/typeaheadbundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,11 @@
}
};

$('input[data-provide="lifo-typeahead"]').each(function(){
var me = $(this),
d = me.data(),
$(document).on('focus.lifo-typeahead.data-api', 'input[data-provide="lifo-typeahead"]', function(e){
var me = $(this);
if (me.data('typeahead')) return;

var d = me.data(),
opts = {
id: me.attr('id').replace(/_text$/, ''),
url: d.url,
Expand Down

0 comments on commit e689e3f

Please sign in to comment.