#sextrafficking | Sex work advocates blast Queens DA’s plan to prosecute buyers | #tinder | #pof | #match


BY MATT TRACY

Less than a year after Melinda Katz told one LGBTQ political club that she backed the outright legalization of sex work and conveyed to another queer club that she would focus on prosecuting “human traffickers or those who force people into sex work,” the top prosecutor in Queens is singing a different tune now that she’s in office — and advocates are fed up.

DecrimNY, the coalition driving the movement to fully decriminalize sex work in New York, joined a chorus of advocates on the issue, including Queens lawmakers, queer political club leaders, and other political figures who are criticizing Katz after she vowed to “aggressively” target buyers of sex work services as part of her newly-unveiled Human Trafficking Bureau.

In an announcement previewing the office, Katz invoked transgender victims of trafficking, vowed to support sex workers, and claimed that the office is committed to combating sex and labor trafficking — a key component of the DecrimNY platform — but then came the fine print. The DA’s explicit plans to go after buyers is a route that advocates have long said could cut off the main source of revenue for sex workers and put them or others they know at risk of getting swept up in the criminal justice system.

Decriminalization backers have also stressed that the interconnected system that makes up the sex trade requires comprehensive reform in order to foster a truly safe environment for workers.

“We have been clear from the start that criminalizing any side of the exchange will cause further harm to people who trade sex,” Leila Raven, who is on the steering committee for DecrimNY, told Gay City News on behalf of the coalition. “Peers and roommates are often charged as third parties, or even as traffickers, for sharing housing and safety strategies. We are disappointed that DA Katz is pursuing an approach that has been proven to put sex workers and survivors at increased risk of violence and exploitation.”

Raven also warned that Black, Latinx, and Asian sex workers — especially those who are poor and carry out their work on the street — will be most impacted by the approach employed by Katz.

Red Canary Song, a collective of Asian sex workers and allies, retweeted a series of Twitter posts critical of Katz’s new plan, including a tweet by Maya Morena asserting that the prosecutor leading the new office, Jessica L. Melton, “literally fights to ensure that sex workers are evicted, denied services, and any business (lower-income businesses) serving people who only use cash (aka poor poeple), and doesn’t have papers (undocumented immigrants) are destroyed.”

For much of the hotly-contested campaign for Queens district attorney, Katz, then borough president, took a timid approach to the topic of sex work while her opponent, out queer public defender Tiffany Cabán, rose to prominence with a campaign that explicitly called for the comprehensive decriminalization of sex work for workers, buyers, and those who help facilitate sex work.

That campaign coincided with increased movement on the issue in the State Legislature, where DecrimNY advocates worked with lawmakers last June to introduce the Stop Violence in the Sex Trades Act, a bill that would decriminalize sex work across the board. Although that bill has yet to move, advocates have focused on a more immediate goal of repealing the “Walking While Trans” loitering law that has been primarily enforced in a way targeting transgender women of color.

Photo by Matt Tracy

Though Katz, who went on to edge Cabán by a razor-thin margin in the Democratic primary and coasted to victory in the general election, didn’t go as far as her rival on the issue, she avoided expressing her reservations in writing about a decriminalization route when she sought the endorsements of LGBTQ political clubs that were closely following the issue.

In fact, Katz and Cabán both told the Jim Owles Liberal Democratic Club that they supported the legalization of sex work, a position that Cabán later clarified, saying she backed the decriminalization route. Notably, advocates have repeatedly stressed that they specifically seek decriminalization and not legalization — the latter term denoting an approach involving active government regulation.

In response to Katz’s plans to open the bureau, Cabán argued that her formal rival must go further if she wishes to actually fight trafficking in the city’s most diverse borough.

“To effectively combat sex trafficking, we need to decriminalize sex work,” Cabán said in a tweet. “That means sellers *and* buyers. This policy does not serve public health or public safety. It makes an already vulnerable sex work community more vulnerable.”

Katz also omitted plans to go after buyers when she turned in a questionnaire for the Stonewall Democratic Club of New York City, which went on to endorse her in the race. She told the club that she “will not prosecute sex workers, but I will prosecute human traffickers or those who force people into sex work by coercion or threats of violence.”

The club’s president, Brian Romero, told Gay City News that the club applauds Katz’s efforts to take on trafficking, which he said is a crime that must be addressed in the city and the state. But he also warned that human trafficking and consensual sex “must not be conflated.”

“We remain concerned about the DA prosecuting people who buy sex and that this will result in the criminalization of queer and trans immigrants and sex workers, particularly from Black and Brown communities,” Romero said in a written response to the newspaper. “Stonewall Democratic Club of NYC maintains that in order to reduce harm perpetuated onto sex workers and their families, we cannot support a Nordic/ End Demand model approach and New York must pass the Stop Violence in the Sex Trades Act.”

Among others to chime in following the Katz announcement included Queens State Senator Jessica Ramos, who is carrying the Stop Violence in the Sex Trades bill in the upper chamber alongside Brooklyn State Senator Julia Salazar.

“Public policy should be about keeping all people safe,” Ramos tweeted. “Prosecuting buyers of sex will only put more people in danger. Customers won’t be incentivized to give sex workers their real name, thus rendering sex workers defenseless if a customer becomes violent.”

Katz did not offer comment for this story in response to Gay City News’ query.

This story first appeared on gaycitynews.com.

// // infinite scroll for homepage // if ($('body.home.infinity, body.home.featured_story').length > 0) { // var countHomePage = 1; // var totalHomepage = 0; // var scroll_on_work_home_page = false; // $(window).scroll(function () { // if ($(window).scrollTop() > $(document).height() / 4) { // if (!scroll_on_work_home_page) { // if (countHomePage > totalHomepage) { // return false; // } else { // loadHomeArticle(countHomePage);

// } // countHomePage++; // } // }

// });

// function loadHomeArticle(pageNumber) { // scroll_on_work_home_page = true; // var infinityScrollAnimation = $('#inifiniteLoader');

// goAjax( // "action=infinite_scroll_homepage&page_no=" + pageNumber + "&loop_file=loop-homepage", // function () { // infinityScrollAnimation.waitMe({color: '#525252'}).waitMe('show'); // }, // function (html) { // infinityScrollAnimation.waitMe('hide'); // console.log("appending content"); // $("#content").append(html); // scroll_on_work_home_page = false;

// } // ) // } // }

// infinite scroll for cateogry articles if ($('body.category').length > 0) {

var count = 2; var total = 0; var scroll_on_work = false; $(window).scroll(function () { if ($(window).scrollTop() > $(document).height() / 4) { if (!scroll_on_work) { if (count > total) { return false; } else { loadArticle(count);

} count++; } }

});

function loadArticle(pageNumber) { scroll_on_work = true; var category_id = $('#category-id').data('category-id'); var infinityScrollAnimation = $('#inifiniteLoader');

goAjax( "action=infinite_scroll&page_no=" + pageNumber + "&loop_file=loop&category_id=" + category_id, function () { infinityScrollAnimation.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { infinityScrollAnimation.waitMe('hide'); $("#content").append(html); scroll_on_work = false;

} ) } }

// infinite scroll for author articles if ($('body.author').length > 0) {

var count = 2; var total = $('.author-wrapper').data('author-all-posts'); var scroll_on_work = false; $(window).scroll(function () {

if ($(window).scrollTop() > $(document).height() / 4) { if (!scroll_on_work) { if (count > total) { return false; } else { loadAuthorArticle(count); } count++; } } });

function loadAuthorArticle(pageNumber) { scroll_on_work = true; var infinityScrollAnimation = $('#inifiniteAuthorLoader'); var author_id = $('.author-wrapper').data('author-id'); goAjax( "action=infinite_scroll_author&page_no=" + pageNumber + "&loop_file=loop&author=" + author_id, function () { infinityScrollAnimation.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { infinityScrollAnimation.waitMe('hide'); $("#content").append(html); scroll_on_work = false; } ) } }

// infinite scroll for tag articles if ($('body.tag').length > 0) { var count = 2; var total = $('.tag-wrapper').data('tag-all-posts'); var scroll_on_work = false; $(window).scroll(function () { if ($(window).scrollTop() > $(document).height() / 4) { if (!scroll_on_work) { if (count > total) { return false; } else { loadTagArticle(count); } count++; } } });

function loadTagArticle(pageNumber) { scroll_on_work = true; var infinityScrollAnimation = $('#inifiniteAuthorLoader'); var tag_name = $('.tag-wrapper').data('tag-slug'); goAjax( "action=infinite_scroll_tag&page_no=" + pageNumber + "&loop_file=loop&tag=" + tag_name, function () { infinityScrollAnimation.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { infinityScrollAnimation.waitMe('hide'); $("#content").append(html); scroll_on_work = false; } ) } }

var calendarEvents = $('#calendarnavigation');

if (calendarEvents.length > 0) { $('li', calendarEvents).click(function () { var $_this = $(this), date = $_this.data('date');

$_this.addClass('current-day').siblings().removeClass('current-day');

goAjax( "action=calendar_events&date=" + date + "&loop_file=loop_event", function () { $("#waitMe").waitMe({color: '#525252'}).waitMe('show'); }, function (html) { $("#waitMe").waitMe('hide'); $("#events-list").html(html); } ); }); }

var alphabet = $('#alphabet');

if (alphabet.length > 0) { $('li a', alphabet).click(function (evt) { evt.preventDefault();

var $_this = $(this), $_this_li = $_this.closest('li'), $_this_letter = $_this.data('letter-char');

if (!$_this_li.hasClass('lock')) { $_this_li.addClass('active').siblings().addClass('lock').removeClass('active'); goAjax( "action=people_by_letter&letter=" + $_this_letter + "&loop_file=loop_people", function () { $("#waitMe").waitMe({color: '#525252'}).waitMe('show'); }, function (html) { $("#waitMe").waitMe('hide'); $("#people-list").html(html); $_this_li.siblings().removeClass('lock'); } ); } }); }

var relatedStoryOnPeoplePage = $('.related-post', '.person-single-post'); if (relatedStoryOnPeoplePage.length > 0) { goAjax( "action=schneps_get_related_people_news_about_post_&title=" + relatedStoryOnPeoplePage.data('headline') + "", function () { relatedStoryOnPeoplePage.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { relatedStoryOnPeoplePage.waitMe('hide').html(html); } ); }

var relatedStoryOnStoryPage = $('.post-footer-block', '#single-story-page'); if (relatedStoryOnStoryPage.length > 0) {

goAjax( "action=schneps_get_related_stories_story_page_&post_id=" + relatedStoryOnStoryPage.data('post-id') + "", function () { relatedStoryOnStoryPage.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { relatedStoryOnStoryPage.waitMe('hide').html(html); } ); }

var relatedStoryOnPlacePage = $('.post-footer-block', '.single-place-page'); if (relatedStoryOnPlacePage.length > 0) {

goAjax( "action=schneps_get_related_and_listening_place_post_&post_id=" + relatedStoryOnPlacePage.data('post-id') + "", function () { relatedStoryOnPlacePage.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { relatedStoryOnPlacePage.waitMe('hide').html(html); } ); }

var relatedStoryOnEventPage = $('.post-footer-block', '.single-event-post'); if (relatedStoryOnEventPage.length > 0) { goAjax( "action=schneps_get_related_stories_story_page_&post_id=" + relatedStoryOnEventPage.data('post-id') + "", function () { relatedStoryOnEventPage.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { relatedStoryOnEventPage.waitMe('hide').html(html); } ); }

var createEventModal = $('#eventModal'); if (createEventModal.length > 0) { createEventModal.find('.post-event-submit').click(function (evt) { evt.preventDefault(); var err = [];

var MAXFILESIZE = 2 * 1024 * 1024;

var event_image = document.getElementById('event-image'); var event_image_input = $('#uploadFileEvent'); var event_title_input = $('#event-title'); var event_description_input = $('#event-description'); var event_address_input = $('#event-address'); var event_website_input = $('#event-website'); var datepicker_input = $('#datepicker'); var timepicker_input = $('#event-time'); var realperson_event_input = $('#defaultRealEvent'); var real_hash_check = createEventModal.find('.realperson-hash').val();

var event_title = event_title_input.val(); var event_description = event_description_input.val(); var datepicker = datepicker_input.val(); var event_address = event_address_input.val(); var event_website = event_website_input.val(); var timepicker = timepicker_input.find('option:selected').val(); var realperson_event = realperson_event_input.val().trim();

var event_image_file = event_image.files[0];

if (err.length === 0) { if (event_title.length == 0) { err.push(event_title_input); }

if (event_description.length === 0) { err.push(event_description_input); }

if (datepicker.length === 0) { err.push(datepicker_input); }

if (timepicker == '0') { err.push(timepicker_input); }

if (event_address.length === 0) { err.push(event_address_input); }

if (event_address_input.hasClass('empty')) { err.push(event_address_input); }

if (realperson_event.length === 0) { err.push(realperson_event_input); }

if (event_website.length > 0) { if (!isUrlValid(event_website)) { err.push(event_website_input); } }

if (event_image_file && (event_image_file.size > MAXFILESIZE || (event_image_file.type != 'image/png' && event_image_file.type != 'image/jpeg'))) { event_image_input.val(''); event_image_input.next().addClass('hide'); err.push(event_image_input); $('.file-error').removeClass('hide'); } else { $('.file-error').addClass('hide'); }

if (err.length === 0) { goAjax( "action=schnep_check_validate&realperson=" + realperson_event + "&realperson_hash=" + real_hash_check, function () { createEventModal.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { var data = $.parseJSON(html); if (data.status == true) { createEventModal.find('form').submit(); } else if (data.status == false && data.message == 'wrong captcha') { createEventModal.waitMe('hide'); $('#defaultRealEvent', '#eventModal').val('').addClass('empty') } } ); } else { show_error_in_modal(createEventModal, err); } } else { show_error_in_modal(createEventModal, err); } }); }

if ($('#constant-contact-signup-1').length > 0) { $('#constant-contact-signup-1 input[type="submit"]').click(function (evt) { evt.preventDefault();

var err = [];

var email_input = $('.cc_email_address input');

if (!checkInputOnEmail(email_input.val())) { email_input.addClass('error'); } else { setCookie('signup', 1); $('#constant-contact-signup-1').submit(); }

}); }

var featuredForm = $('#featured-form-wrapper'); if (featuredForm.length > 0) { featuredForm.find('.featured-submit').click(function (evt) { evt.preventDefault(); var err = [];

var email_input = $('#featured-email'), name_input = $('#featured-name'), phone_input = $('#featured-phone'), realperson_input = $('#defaultRealFeatured'), real_hash_check = featuredForm.find('.realperson-hash').val();

var email = email_input.val().trim(); var name = name_input.val().trim(); var phone = phone_input.val().trim(); var realperson = realperson_input.val().trim();

if (err.length === 0) { if (email.length == 0) { err.push(email_input); }

if (!checkInputOnEmail(email)) { err.push(email_input); }

if (name.length === 0) { err.push(name_input); }

if (phone.length === 0) { err.push(phone_input); }

if (realperson.length === 0) { err.push(realperson_input); }

// console.log(registrationModal.find('input'))

if (err.length === 0) { goAjax( "action=schneps_get_featured_x&email=" + email + "&name=" + name + "&phone=" + phone + "&realperson=" + realperson + '&realperson_hash=' + real_hash_check, function () { }, function (html) { var data = $.parseJSON(html); if (data.status == true) { $('.featured-content-wrapper').html('

Thank you. Someone from our sales department will contact you soon.

'); } else if (data.status == false && data.message == 'wrong captcha') { $('#defaultRealFeatured', '#featured-form-wrapper').val('').addClass('empty') } } ); } else { show_error_in_modal(featuredForm, err); } } else { show_error_in_modal(featuredForm, err); }

}) }

/** * Registration AJAX QUERY. * Start */

var registrationModal = $('#registrationModal'); if (registrationModal.length > 0) { registrationModal.find('#registration-user-form').submit(function (evt) { evt.preventDefault();

var err = [];

var username_input = $('#signup_username'), useremail_input = $('#signup_email'), password_input = $('#signup_password'), realperson_input = $('#defaultReal'), name_input = $('#field_1'), confirm_password_input = $('#signup_password_confirm'), real_hash_check = registrationModal.find('.realperson-hash').val(), subscribe_checkbox = $('#subscribe');

var username = username_input.val().trim(); var useremail = useremail_input.val().trim(); var password = password_input.val().trim(); var realperson = realperson_input.val().trim(); var name = name_input.val().trim(); var group = $('option:selected', '#field_reg_groups').val(); var security = $('#signonsecurity').val(); var subscribe = subscribe_checkbox.is(':checked');

if ((confirm_password_input.val() !== '' && password !== '') && confirm_password_input.val() !== password) { err.push(password_input); err.push(confirm_password_input); }

if (err.length === 0) { if (username.length == 0) { err.push(username_input); }

if (useremail.length === 0) { err.push(useremail_input); }

if (!checkInputOnEmail(useremail)) { err.push(useremail_input); }

if (password.length === 0) { err.push(password_input); }

if (name.length === 0) { err.push(name_input); }

if (realperson.length === 0) { err.push(realperson_input); }

if (confirm_password_input.val().length === 0) { err.push(confirm_password_input); }

if (err.length === 0) { goAjax( "action=schneps_create_user_for_bp_&username=" + username + "&useremail=" + useremail + "&password=" + password + "&name=" + name + "&group=" + group + "&realperson=" + realperson + '&realperson_hash=' + real_hash_check +'&security='+security+'&subscribe='+subscribe, function () { registrationModal.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { var data = $.parseJSON(html); if (data.status == true) { registrationModal.waitMe('hide'); registrationModal.find('.content').html('Please check your email for confirmation link.'); } else if (data.status == false && data.message == 'wrong captcha') { registrationModal.waitMe('hide'); $('#defaultReal', '#registrationModal').val('').addClass('empty') } else if (data.status == false) { registrationModal.waitMe('hide'); $('.error-wrapper', '#registrationModal').html('This email or login is already taken.') } } ); } else { show_error_in_modal(registrationModal, err); } } else { show_error_in_modal(registrationModal, err); } }); }

/** * Registration AJAX QUERY. * End */

function show_error_in_modal(modal, array) { if (array.length > 0) { $(modal).find('.content').find('.miss-fields').remove(); $(modal).find('.content').prepend('Please, check if all compulsory fields are filled'); } $(modal).find('input').each(function () { $(this).removeClass('empty'); });

$(modal).find('textarea').each(function () { $(this).removeClass('empty'); });

$(modal).find('select').each(function () { $(this).removeClass('empty'); }); array.forEach(function (n, e) { $(n).val('').addClass('empty'); }) }

var inviteModal = $('#inviteModal'); if (inviteModal.length > 0) { inviteModal.find('.invite-submit').click(function (evt) { evt.preventDefault(); var invite_email_input = $('#invite-anyone-email-addresses');

var err = []; var invite_email = invite_email_input.val().trim();

if (invite_email.length == 0) { err.push(invite_email_input); }

if (!checkInputOnEmail(invite_email)) { err.push(invite_email_input); }

if (err.length == 0) { goAjax( "action=schneps_invite_email_for_bp_&email=" + invite_email, function () { inviteModal.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { if (html === 'true') { // inviteModal.find('.content').html('Your invite was sent!') // inviteModal.foundation('reveal', 'close'); inviteModal.waitMe('hide'); location.reload(); } } ); } else { show_error_in_modal(inviteModal, err); } }); }

/** * Add new topic to group AJAX QUERY. * Start */ var conversationModal = $('#conversationModal');

if (conversationModal.length > 0) { conversationModal.find('.post-conversation').click(function (evt) { evt.preventDefault();

var err = [];

var conversation_title_input = $('#discussion-title'); var conversation_text_input = $('#discussion-text'); var realperson_discussion_input = $('#defaultRealDiscussion'); var real_hash_check = conversationModal.find('.realperson-hash').val();

var conversation_title = conversation_title_input.val().trim(); var conversation_text = conversation_text_input.val().trim(); var group_id = $('option:selected', '#forum-neighbourhood').val(); var realperson = realperson_discussion_input.val().trim();

if (err.length === 0) { if (conversation_title.length == 0) { err.push(conversation_title_input); }

if (conversation_text.length == 0) { err.push(conversation_text_input); }

if (realperson.length == 0) { err.push(realperson_discussion_input); }

if (err.length === 0) { goAjax( "action=schneps_create_conversation&title=" + conversation_title + "&text=" + conversation_text + "&group_id=" + group_id + "&realperson=" + realperson + "&realperson_hash=" + real_hash_check, function () { conversationModal.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { var data = $.parseJSON(html); if (data.status == true) { if (data.hasOwnProperty('redirect')) { conversationModal.waitMe('hide'); document.location.href = data.redirect; } } else if (data.status == false && data.message == 'wrong captcha') { conversationModal.waitMe('hide'); $('#defaultRealDiscussion', '#conversationModal').val('').addClass('empty') }

} ); } else { show_error_in_modal(conversationModal, err); } } }); } /** * Add new topic to group AJAX QUERY. * End */

$('#user_neighbourhood_selecting_from_profile').change(function () { var $_this = $(this).find('option:selected'); var $_this_val = $_this.val();

goAjax( "action=schnep_insert_user_neighbourhood&selected_neighbourhood_id=" + $_this_val, function () { }, function (html) { var data = $.parseJSON(html); if (data.result == 1) { $('.main-menu-neighbourhood').attr('href', '/groups/' + data.data.slug).text(data.data.name); } else if (data.result == -1) { $('.main-menu-neighbourhood').closest('li').remove(); } else if (data.result == 0) { $('#menu-pages, #menu-pages-1').append('

  • ' + data.data.name + '
  • '); }

    } ); });

    /** * Add classified AJAX QUERY. * Start */ var classifiedModal = $('#classifiedsModal'); if (classifiedModal.length > 0) { classifiedModal.find('.post-classified').click(function (evt) { evt.preventDefault();

    var err = [];

    var title_input = $('#classifieds-title'); var description_input = $('#classifieds-description'); var classifieds_email_input = $('#classifieds-email'); var realperson_classified_input = $('#defaultRealClassified'); var real_hash_check = classifiedModal.find('.realperson-hash').val();

    var title = title_input.val(); var description = description_input.val(); var classifieds_email = classifieds_email_input.val(); var category = $('option:selected', '#classifieds-category').val(); var realperson_classified = realperson_classified_input.val().trim();

    if (err.length === 0) { if (title.length == 0) { err.push(title_input); }

    if (description.length === 0) { err.push(description_input); }

    if (classifieds_email.length === 0) { err.push(classifieds_email_input); }

    if (!checkInputOnEmail(classifieds_email)) { err.push(classifieds_email_input); }

    if (realperson_classified.length === 0) { err.push(realperson_classified_input); }

    if (err.length === 0 && category != 0) { goAjax( "action=schnep_check_validate&realperson=" + realperson_classified + "&realperson_hash=" + real_hash_check, function () { classifiedModal.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { var data = $.parseJSON(html); if (data.status == true) { classifiedModal.waitMe('hide'); classifiedModal.find('form').submit(); } else if (data.status == false && data.message == 'wrong captcha') { classifiedModal.waitMe('hide'); $('#defaultRealClassified', '#classifiedsModal').val('').addClass('empty') } } );

    } else { show_error_in_modal(classifiedModal, err); } } else { show_error_in_modal(classifiedModal, err); }

    }); }

    var date_time_wrapper = $('.date-time-wrapper');

    date_time_wrapper.on('click', '.cancel-btn', function () { var cancel_btn = $(this); var $_this = $('.unjoin-to-event-wrapper'); var event_id = $('#event_join_id').val(); goAjax( "action=schneps_event_unjoin_&event_id=" + event_id, function () { }, function (html) { if (html == 1) { $_this.removeClass('unjoin-to-event-wrapper').addClass('join-to-event-wrapper').find('.text').text('rsvp'); cancel_btn.remove(); var new_person_event_count = Number($('.count-person-data').text()) - 1;

    if (new_person_event_count === 0) { $('.count-person').addClass('hide'); } else if (new_person_event_count == 1) { $('.count-person-text .verb').text('is'); } else { $('.count-person-text .verb').text('are'); } $('.count-person-data').text(new_person_event_count); } } ); });

    date_time_wrapper.on('click', '.join-to-event-wrapper', function () { var $_this = $(this); if (!$_this.hasClass('unsigned')) { var event_id = $('#event_join_id').val(); goAjax( "action=schneps_event_join_&event_id=" + event_id, function () { }, function (html) { if (html == 1) { $_this .removeClass('join-to-event-wrapper') .addClass('unjoin-to-event-wrapper') .find('.text') .text('attending') .append('

    Click Here to Cancel

    ');

    var new_person_event_count = Number($('.count-person-data').text()) + 1;

    $('.count-person').removeClass('hide'); $('.count-person-data').text(new_person_event_count);

    if (new_person_event_count == 1) { $('.count-person-text .verb').text('is'); } else { $('.count-person-data').text(new_person_event_count); $('.count-person-text .verb').text('are'); }

    } } ); }

    });

    $('#save-user-description').click(function (evt) { evt.preventDefault(); var description = $('#user-description').val();

    goAjax( "action=schnep_user_description&description=" + description, function () { }, function (html) { var data = $.parseJSON(html); if (data.result) { $('.js-user-description-submit').html('

    You description was saved!

    '); } } ); });

    var event_rsvp_wrapper = $('.event-rsvp-wrapper');

    event_rsvp_wrapper.on('click', '.js-join-event-rsvp', function (evt) { evt.preventDefault(); var $_this = $(this); if (!$_this.hasClass('unsigned')) { var event_id = $_this.data('event-id'); goAjax( "action=schneps_event_join_&event_id=" + event_id, function () { }, function (html) { if (html == 1) { $_this.removeClass('js-join-event-rsvp').addClass('js-unjoin-event-rsvp').text('cancel'); } } ); } });

    event_rsvp_wrapper.on('click', '.js-unjoin-event-rsvp', function (evt) { evt.preventDefault(); var $_this = $(this); if (!$_this.hasClass('unsigned')) { var event_id = $_this.data('event-id'); goAjax( "action=schneps_event_unjoin_&event_id=" + event_id, function () { }, function (html) { if (html == 1) { $_this.removeClass('js-un-join-event-rsvp').addClass('js-join-event-rsvp').text('rsvp'); } } ); } });

    $('.bp-auth-twitter').click(function () { var loginModal = jQuery('#loginModal'); loginModal.waitMe({color: '#525252'}).waitMe('show'); });

    // Perform AJAX login on form submit $('form#loginform').on('submit', function (e) {

    var username = $('form#loginform #username').val(); var password = $('form#loginform #password').val(); var redirect = $('form#loginform #redirect').val(); var loginModal = jQuery('#loginModal'); goAjax( "action=schnep_ajax_login&username=" + username + "&password=" + password + "&redirect=" + redirect, function () { $('.error-wrapper', '#loginform').html(''); loginModal.waitMe({color: '#525252'}).waitMe('show'); }, function (html) { var data = $.parseJSON(html); if (data.loggedin == false) { $('.error-wrapper', '#loginform').html('' + data.message + ''); loginModal.waitMe('hide'); } else { document.location.href = data.redirect; } } ); e.preventDefault(); });

    /** * Check address to correct! * Start */ $('#event-address').blur(function () { var $_this = $(this); var address = $_this.val();

    goAjax( "action=schneps_check_address&address=" + address, function () { }, function (html) { var data = $.parseJSON(html);

    if (data.result == false) { $_this.addClass('empty'); } else { $_this.removeClass('empty'); } } ); });

    $('#classifieds-address').blur(function () { var $_this = $(this); var address = $_this.val();

    if (address.length > 0) { goAjax( "action=schneps_check_address&address=" + address, function () { }, function (html) { var data = $.parseJSON(html); if (data.result == false) { $_this.addClass('empty'); } else { $_this.removeClass('empty'); } } ); }

    }); /** * Check address to correct! * End */

    /** * Share btn counter. * Start */

    $('.ssba a[class^="ssba_"]').click(function (evt) { // evt.preventDefault(); var $_this = $(this); var type = $_this.find('img').attr('title'); var post_id = $('#content').data('post-id');

    goAjax( "action=schneps_shared_counter&type=" + type + "&post_id=" + post_id, function () { }, function (html) { var data = $.parseJSON(html); } ); }); /** * Share btn counter. * End */

    $('#eventModal form, #classifiedsModal form, #conversationModal form, #loginModal form, #inviteModal form').on('keypress', function (e) { var code = e.keyCode || e.which; if (code == 13 && e.target.nodeName !== 'TEXTAREA') { e.preventDefault(); return false; } });

    /** * Add classified AJAX QUERY. * End */

    function goAjax(data, before, success) { $.ajax({ url: "https://qns.com/wp-admin/admin-ajax.php", type: 'POST', data: data, beforeSend: function () { before(); }, success: function (html) { success(html); } }); }

    function checkInputOnEmail(str) { var pattern = /^([a-z0-9_.-])+@[a-z0-9-]+.([a-z]{2,4}.)?[a-z]{2,4}$/i; if (str !== '') { if (pattern.test(str)) { return true; } else { return false; } } else { return false; } }

    function isUrlValid(url) { return /^(http[s]?://)?(www.)?([dw.-]+).([w.]{2,5})/i.test(url); }

    if (window.location.pathname == "/groups/astoria/" && !getCookie('first_time')) { $('#welcomeModal').foundation('reveal', 'open');

    } });

    function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toUTCString(); var path = "path=/"; document.cookie = cname + "=" + cvalue + "; " + expires + "; " + path; }

    function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for (var i = 0; i 0) { for (var i = 0; i 0) { for (var i = 0; i



    Source link

    --------------------------------------------------------------

    Source link

    .  .  .  .  .  .  . .  .  .  .  .  .  .  .  .  .   .   .   .    .    .   .   .   .   .   .  .   .   .   .  .  .   .  .