I have this function notify() with three parameters, user id(number), message, and link. On the website that I am working on, there are users that are invited to a party by a party host, and I wanna use this notify function to notify only those users that are invited. Every user has their own name and id (in numbers). But since the user id is a number, how do I use for loop (.each) to notify those users that are invited? For instance, there are 7 users (user 1-7), but only the users 1,3,5 are invited so I want to notify only 1,3, and 5.
P.S. This is what I have so far, I am so new to JQuery so please help!
if ($('#create-party-form').length) { //not sure if it's even right..
$('#submit-invitation-btn').on('click', function() {
$('').each(function() { //this is where I am stuck
})
notify( ,message, link); //first one should be id# of users that are invited..
});
}
Thank you in advance!