Skip to content

Commit

Permalink
Disable JQuery and tag-it autocomplete function #39
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy-1 committed Aug 29, 2019
1 parent 95ebaf2 commit a555c81
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion resources/dist/app.min.js

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions resources/js/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// initiating tag-it

$(document).ready(function() {
$("#tagitInput").tagit();
$("#tagitInput").tagit({
autocomplete: {disabled: true}
});
});

(function () {
Expand All @@ -23,14 +25,14 @@ $(document).ready(function() {

(function () {
var searchSelects = $('.search__form .search__select');

if (!searchSelects.length) return false;

searchSelects.wrap("<div class='select__wrapper col'></div>");
})();

(function($) {

// Open login modal when nav menu links clicked
$('.nmi_type_user_login').click(function() {
$('#loginModal').modal();
Expand All @@ -42,22 +44,22 @@ $(document).ready(function() {
// Article detail page: authors

(function ($) {

// Show author affiliation under authors list (for large screen only)
var authorString = $('.author-string__href');
$(authorString).click(function(event) {
event.preventDefault();
var elementId = $(this).attr('href').replace('#', '');
$('.article-details__author').each(function () {

// Show only targeted author's affiliation on click
if ($(this).attr('id') === elementId && $(this).hasClass('hidden')) {
$(this).removeClass('hidden');
} else {
$(this).addClass('hidden');
}
});

// Add specifiers to the clicked author's link
$(authorString).each(function () {
if ($(this).attr('href') === ('#' + elementId) && !$(this).hasClass('active')){
Expand All @@ -76,15 +78,15 @@ $(document).ready(function() {
// Not display the menu if all items are inaccessible

(function ($) {

var navPrimary = $('#navigationPrimary');

if (!navPrimary.length) return false;

if (!navPrimary.children().length > 0) {
$('.main-header__nav').addClass('hidden');
}

})(jQuery);

// Toggle display of consent checkboxes in site-wide registration
Expand Down

0 comments on commit a555c81

Please sign in to comment.