codersgrave / Facebook-Friend-Selector

This repo is no longer maintained. Feel free to fork and update!
http://facebook-friend-selector.codersgrave.com
64 stars 22 forks source link

Uncaught TypeError: Object #<Object> has no method 'onPreStart' #10

Closed KPRATIK closed 11 years ago

KPRATIK commented 11 years ago

I have copied all the files on my server. When i click on the link to open friend selector window I get following error message:

Uncaught TypeError: Object # has no method 'onPreStart' jquery.friend.selector-1.2.1.js:27

Could you please let me know whats wrong here?

DaanMeijer commented 11 years ago

It seems that in the last commit, onPreStart has become mandatory. A quick fix is adding it to your options, e.g.

jQuery(document).ready(function($) {
$(".bt-fs-dialog").fSelector({
  onSubmit: function(response){
    // example response usage
    alert(response);
  },
  onPreStart: function(){

  }
});
});
KPRATIK commented 11 years ago

Thanks this worked