0

I'm using twitter's bloodhound suggestion engine, following is the code snippet I'm using

// instantiate the bloodhound suggestion engine
    var searchData = new Bloodhound({
        datumTokenizer: function (d) {
            return Bloodhound.tokenizers.whitespace(d.value);
        },
        queryTokenizer: Bloodhound.tokenizers.whitespace,        
        remote: {
            url: 'http://localhost/address/fetch?q=%Query' //Local URL           
        }
    });
    // initialize the bloodhound suggestion engine
    searchData.initialize();
    // instantiate the typeahead UI
    $('.typeahead').typeahead({        
        hint:false,
        highlight: true,
        minLength: 3
        }, {
        name:'search-data',
        displayKey: 'title',
        source: searchData.ttAdapter(),       
        templates: {            
            suggestion: Handlebars.compile('<p><strong>{{title}}</strong></p>')            
        }        
    });

Ajax request is not firing what I've mentioned in above code snippet, if jQuery Validation plugin is not included in page then it is working fine.

How to overcome this issue ?

Upadate:

I've upgraded jQuery validation plugin from 1.7 to latest(1.12) then it had fixed the issue, but I've not know what's reason behind this. If any one know exact reason then please post the answer.

Mahesh.D
  • 1,691
  • 2
  • 23
  • 49

1 Answers1

0

Just out his code at top of js script

 jQuery.noConflict( true )
    //or
$.noConflict( true )
Amit Kumar
  • 3,384
  • 6
  • 25
  • 42