Organizational Research By

Surprising Reserch Topic

bind jquery ui autocomplete using live


bind jquery ui autocomplete using live  using -'jquery,binding,autocomplete,jquery-live'

I've searched everywhere, but I can't seem to find any help...

I have some textboxes that are created dynamically via JS, so I need to bind all of their classes to an autocomplete. As a result, I need to use the new .live() option.

As an example, to bind all items with a class of .foo now and future created:

$('.foo').live('click', function(){
  alert('clicked');
});


It takes (and behaves) the same as .bind(). However, I want to bind an autocomplete...

This doesn't work:

$('.foo').live('autocomplete', function(event, ui){
  source: 'url.php' // (surpressed other arguments)
});


How can I use .live() to bind autocomplete?

UPDATE

Figured it out with Framer:

$(function(){
  $('.search').live('keyup.autocomplete', function(){
    $(this).autocomplete({
      source : 'url.php'
    });
  });
});

    

asked Oct 7, 2015 by sachin wagh
0 votes
17 views



Related Hot Questions

9 Answers

0 votes
NULL
answered Oct 7, 2015 by vijaygupta1980
0 votes
NULL
answered Oct 7, 2015 by badhwar.rohit
0 votes
NULL
answered Oct 7, 2015 by yogeshplv
0 votes
NULL
answered Oct 7, 2015 by patilkiran.101
0 votes
NULL
answered Oct 7, 2015 by maurya
0 votes
NULL
answered Oct 7, 2015 by gauravsinghal83
0 votes
NULL
answered Oct 7, 2015 by dhananjayksharma
0 votes
NULL
answered Oct 7, 2015 by amit_cmps
0 votes
NULL
answered Oct 7, 2015 by thiru

...