Skip to content

Instantly share code, notes, and snippets.

@amirshim
Created January 28, 2011 17:49
Show Gist options
  • Save amirshim/800641 to your computer and use it in GitHub Desktop.
Save amirshim/800641 to your computer and use it in GitHub Desktop.
returns name/id object pair list
this.getSelectedIds = function() {
var ids = [];
$.each(elem.find(".jfmfs-friend.selected"), function(i, friend) {
ids.push({id:$(friend).attr("data-id"), name:$(friend).find('.friend-name').text()});
});
return ids;
};
@fligen
Copy link

fligen commented Jan 28, 2011

are you a freelance coder? and if so how much per hour and would you like to be a part of my upcoming project?

            <div id="jfmfs-container">
              <div id="show-friends" style="display:none;">Show Selected Friends</div>
              </div> 
              <a href="#" id="show-friends" style="display:none;">Add Selected Friends</a> 
              <div id="selected-friends" style="height:30px"></div> 


          </div> 

at the bottom of the script i can call the selected names in a div but i'm having trouble putting that data into a form, what i would like to see happen is the selected friends facebook userid post to a hidden form element so i can pass this data to my database. any help would be greatly appreciated.

@amirshim
Copy link
Author

There are many solutions on stackoverflow Search for jquery ajax json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment