Article added to library!
x
Pubchase is a service of protocols.io - free, open access, crowdsourced protocols repository. Explore protocols.
Sign in
Reset password
or connect with
Facebook
By signing in you are agreeing to our
Terms Of Service and Privacy Policy
  • See more
  • '); var ntfc_preview = ''; $.post('/api/v1/get_notifications', function(r) { var ntfc_read_pending = 0; var ntfc_pending = 0; $.each(r.notifications.pending, function(index, ntfc_object) { ntfc_read_pending++; ntfc_pending++; if (ntfc_read_pending
    ' + ntfc_object.full_name +'' + ntfc_object.time + '
    ' + ntfc_object.description +'
    '; }) if (ntfc_read_pending
    ' + ntfc_object.full_name +'' + ntfc_object.time + '
    ' + ntfc_object.description +'
    '; }) $('.notification-block .dropdown-menu').html(ntfc_preview); $('.notification-block .dropdown-menu').append('
  • See more
  • '); if (ntfc_pending > 0) { $('.notification-count').text(ntfc_pending).show(); } else { $('.notification-count').hide(); } } else { $('.notification-block .dropdown-menu').html(ntfc_preview); $('.notification-block .dropdown-menu').append('
  • See more
  • '); if (ntfc_pending > 0) { $('.notification-count').text(ntfc_pending).show(); } else { $('.notification-count').hide(); } } if (ntfc_read_pending == 0) { $('.notification-block .dropdown-menu').html('
  • You don\'t have any notifications
  • See more
  • '); $('.notification-count').hide(); } data = {'nid' : '', 'ntid' : 1}; $.post('/api/v1/notification_action', data, function(r) { if (r.request == 'OK') { $('.notification-count').hide(); } }); }, "json"); }); $('.search-save-box').on({ click : function(e) { e.preventDefault(); var search_attr = $(this).attr('rel').split(','); var p = search_attr[1]; var tf = search_attr[0]; window.location = '/search?tf='+tf+'&jc='+jc+'&keywords='+$(this).html()+'&s='+$('#sort_order').val()+'&p='+p; } }, '.search-name'); $( "#keywords_main, #keywords_mobile" ).focus(function(e) { show_saved_searches(e, $(this)); }); $(window).resize(function () { if ($('.search-save-box').is(':visible')) { if ($('#keywords_main').is(':visible')) var left_search_save = $('#keywords_main').offset().left; if ($('#keywords_mobile').is(':visible')) var left_search_save = $('#keywords_mobile').offset().left; $('.search-save-box').css('left',left_search_save); } }); $('.search-save-box').on({ click : function(e) { e.preventDefault(); delete_saved_search($(this)); } }, '.search-name-close'); $('.search-save-box, #keywords_main, #keywords_mobile').click(function(e) { e.stopPropagation(); }); $(document).click(function(e) { $('.search-save-box').hide(); }); $( "#keywords_main, #keywords_mobile" ).autocomplete({ source: function( request, response ) { // data contains the JSON object textStatus contains the status: success, error, etc $.post('/api/v1/searches', {'key' : request.term}, function(data, textStatus) { response(data); }, "json") }, select: function (event, ui) { var reportname = ui.item.value; var thelinks = '/search?tf='+$('#time_frame').val()+'&jc='+jc+'&keywords='+reportname+'&s='+$('#sort_order').val()+'&p='+$('#people_cluster').val(); } }); $('.search-go').click(function(e) { e.preventDefault(); window.location = get_search_url(); }); $('.logout').click(function(e) { e.preventDefault(); }); $('.header_keywords, .home_page_keywords').on('keydown', function(e) { if (e.keyCode == 13) { window.location = get_search_url(); } $('.search-save-box').hide(); }); $('.seemore').click(function(e){ e.stopImmediatePropagation(); }); });
    ' + r.title + '
    [+]
    '; } else { var new_title = ''+new_link[0]+'' + close_link[1] + ''; } } else { var thisTitle = r.title; thisTitle = thisTitle.slice(450); if (thisTitle.length > 0) { thisTitle = r.title; var new_title = '
    ' + thisTitle.slice(0, 400) + '...
    ' + r.title + '
    [+]
    '; } else { var new_title = ''+r.title+''; } } qa_list = qa_list + '
    \
    ' + new_title + '
    \
    \
    '+r.views+'
    views
    \
    0) { qa_list = qa_list + ' title="Some of the answeres are accepted!"'; } else { qa_list = qa_list + ' title="No accepted answers yet."'; } qa_list = qa_list + '>
    '+r.answers+'
    answers
    \
    \
    \
    '; $.each(r.tags, function(index, value) { qa_list = qa_list + ''+ decodeURIComponent(value.tag_name)+''; }); qa_list = qa_list + '
    \
    \ '+format_date(r.created_date)+'\
    \
    '; }); if (qa_list == '') { $('.essay-list').html('
    No questions found
    '); } else { $('.essay-list').html(qa_list); } } }); } function scroll_to_mentor(m_id) { var adjuster = 70; if (isMobile.any) adjuster = 10; $('html, body').animate({ scrollTop: $('#'+m_id).offset().top-adjuster }, 100, function() { // $('#'+m_id).effect("highlight"); }); } function get_mentors() { $.post('/api/v1/get_mentors', function(e) { if (e.request == 'OK') { var qa_list = '
    By Name'; $.each(e.types, function(i, r) { qa_list = qa_list + '' + r.description + ''; mentor_types.push(r.mentor_type_id); }); qa_list = qa_list + '
    '; $.each(e.data, function(i, r) { id = (r.first_name+'-'+r.last_name.replace('-','')).replace(/ /g,''); qa_list = qa_list + '
    \
    \ \
    \
    '+r.first_name+' '+r.last_name+'
    \
    '+r.bio+'
    '; if (r.affiliation_url != null) { qa_list = qa_list + ''; } qa_list = qa_list + '
    '; }); $('.essay-list').html(qa_list); mentor_div_id = get_parameter_by_name('m'); if (mentor_div_id.length > 0) { setTimeout(function(){scroll_to_mentor(mentor_div_id);}, 200); } } }); } function SearchTags() { var search_tags = ''; $('.qa-tag-search .tag-active').each(function() { if (search_tags.length == 0) search_tags = $(this).find('.name-of-tag').attr('data-tag-id') else search_tags += ','+$(this).find('.name-of-tag').attr('data-tag-id'); }) return search_tags; } $(document).on({ click : function() { var type = $(this).attr('rel'); if (type == 0) { $('.mentors-block').fadeIn('fast'); $('.qa-mentor-type').css('fontWeight', 'normal'); $(this).css('fontWeight', 'bold'); return; } for(i = 0; i
    '); window.history.pushState("object or string", "Title", "/career/ask?" +essay_val); if (essay_val == 'mentors') { get_mentors(); } if (essay_val == 'mostviewed') { load_questions_list('popular', '', ''); } if (essay_val == 'recent') { load_questions_list('recent', '', ''); } }); $('.search-career-input').keypress(function (e) { if (e.which == 13) { $('.essay-list').html('
    '); load_questions_list('', $('.search-career-input').val(), ''); } }); $('.search-career-btn').click(function (e) { $('.essay-list').html('
    '); load_questions_list('', $('.search-career-input').val(), ''); }); $('.essay-list').on('click', '.qa-block .tag-active', function (e){ var add_tag_search = true; var $this = $(this).find('.name-of-tag'); $('.qa-tag-search .tag-active').each(function() { if ($(this).find('.name-of-tag').attr('data-tag-id') == $this.attr('data-tag-id')) add_tag_search = false; }) if (add_tag_search == true) { var tag_search = $('.qa-tag-search').html(); $('.qa-tag-search').html(tag_search + ''+$(this).html()+''); var new_search_tags = SearchTags(); $('.essay-list').fadeOut('fast',function() { $('.essay-list').show(); $('.essay-list').html('
    '); load_questions_list('recent', '', new_search_tags); }); } }); $('.essay-block').on('click', '.qa-tag-search .tag-close', function (e){ $(this).parent().remove(); var new_search_tags = SearchTags(); $('.essay-list').fadeOut('fast',function() { $('.essay-list').show(); $('.essay-list').html('
    '); load_questions_list('recent', '', new_search_tags); }); }); $(document).on('click', '.collapse-desc', function(e) { e.preventDefault(); e.stopImmediatePropagation(); if ($(this).text() == '[+]') { $(this).parent().find('.desc-slice').css('display', 'none'); $(this).parent().find('.desc-original').css('display', 'inline'); $(this).text('[-]'); } else { $(this).parent().find('.desc-slice').css('display', 'inline'); $(this).parent().find('.desc-original').css('display', 'none'); $(this).text('[+]'); } }) }); NEB

    Ask your question

    This forum is designed to provide a safe and helpful space for academic career advice and mentoring.
    We reserve the right to remove questions and comments that are aggressive in nature or use inflammatory/insulting language.

    Ask your question anonymously