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

Can i pass some parameter while clicking link to launch friend selector window #14

Open KPRATIK opened 11 years ago

KPRATIK commented 11 years ago

Sorry for being so stupid but I am new to javascript so could not find a way. I am currently using it the same way you have shown in your example:

a href="javascript:{}" class="bt-fs-dialog">Click here

and in JS jQuery(document).ready(function($) { $(".bt-fs-dialog").fSelector({ onSubmit: function(response){ } }); });

Now I want to pass some parameter when I click on this link. Could you please let me know how can I do it?

Thanks

jeremypetrequin commented 10 years ago

You want to pass some parameter to fSelector ? If yes, just do

jQuery(document).ready(function($) {
    $(".bt-fs-dialog").fSelector({
        parameter1 : 'parameter1Value',
        parameter2 : 'parameter2Value',
        onSubmit: function(response){
        }
    });
});