Questions tagged [jquery]

jQuery is a Javascript library, consider also adding the Javascript tag. jQuery is a popular cross-browser JavaScript library that facilitates Document Object Model (DOM) traversal, event handling, animations and AJAX interactions by minimizing the discrepancies across browsers. A question tagged jquery should be related to jquery, so jquery should be used by the code in question and at least jquery usage-related elements need to be in the question.

0
votes
0answers
3 views

jQuery append function called once but appending same element to two places

Basically, I'm reading settings from a file (just an array of titles, descriptions, and input types) and then appending the data inside a div. It does this except also puts the div right outside the ...
2
votes
0answers
7 views

Trying to validate date entry with javascript regex as the user types

I'm trying to update an older app with some date validation as the user types it in a text field. I have a bare bones demo here http://jsfiddle.net/7d82j0ky/2/ where if you enter the following dates: ...
0
votes
0answers
7 views

Bootstrap nav menu remember collapse state on page refresh/change

I have a simple sidebar on my site (every page) with the following html: <nav id="sidebar"> <ul class="list-unstyled components"> <li class="active"> ...
0
votes
0answers
6 views

javascript plugin only working when mouse enters the viewport

I'm using a javascript plugin called jGravity.js and have managed to make the gravity effect work on the relevant div elements. However the script only starts when the mouse enters the viewport, ...
0
votes
1answer
12 views

How to hide post after sometime?

This is the detail of question. I've column in database named ( time_show ) it's time for select when the post is hide , so after this time the post should be hidden , I been try this func js but it's ...
-2
votes
0answers
9 views

Display result of a operation as a choice button

is there a way to display the result of this operation as a button to choice? Thanks a lot var number = prompt("put a random number"); var number = number%4;
-3
votes
0answers
25 views

Click not triggered on Javascript function that submits to Facebook Pixel

The following code tracks the number of clicks on the element and then submits the result to Facebook Pixel. However, the event is not triggered for some reason. Thought it's a variable scope problem,...
1
vote
1answer
25 views

Not getting total value of input tags

Why my codes is not getting the total value of each row?, its getting only the first row value. tried to insert it into .each function, but its not functioning function calc_total() { total=0; ...
0
votes
1answer
13 views

Razor pages jQuery Autocomplete doing nothing

I have implemented the JQuery Autocomplete in the following format: AddApplication.cshtml <div> <form> <div> <input type="text" name="appName" placeholder=...
0
votes
1answer
11 views

how to display the value of an input on jquery?

i have 2 form form1 and form2, the form2 hide and when i click on valid button form1 gets hide and form2 show, form1 contains an input1, i want when i click on btn validate the value of input1 put in ...
0
votes
1answer
35 views

Javascript not working when import bootstrap

I am trying to implement this search bar into my webpage: https://github.com/jeffersonRibeiro/jquery-simpleSelect but it does not seem to work when I import bootstrap. I tried to see if I was ...
0
votes
0answers
16 views

Scraping text from a webpage using Node.js

I'm trying to scrape the text from a given webpage. I'm using Node.js and the problem is that while the following code does indeed scrape the text, it has these pesky whitespaces all over and I don't ...
-1
votes
0answers
58 views

Link doesn't work after I added JavaScript

My anchor in the body section doesn't work after I added JavaScript/jQuery. Any idea how to fix this? If I disable the JavaScript code, the link will work. So it must be a JavaScript issue. Also, I ...
0
votes
1answer
19 views

How to handle event removal when utilizing a named function will hinder access to contextual state

I am listening for change on a file input, and I need to remove the listener after it has 'heard' something, each time. The problem is that with a named function (can't remove listeners on anonymous ...
0
votes
1answer
14 views

after drag and drop how do I save the new order in an array by using dragula?

I am using Dragula for sorting and ordering some , but I need to get new order values into an array to save it through PHP. I am using it through JQuery or Javascript. <div id="right-events"...
0
votes
0answers
11 views

dropDownCheckList function disables the multiselect checkbox list with a blurred color but prop() for single select dropdown doesn't

I want to shade the disabled single select dropdown with blurred color when disabled(as $('#abc').dropdownchecklist('disable');) like as dropDownCheckList does so as to show good appearance on screen. ...
0
votes
2answers
22 views

How to select input elements with custom data atributes?

I need to get all selected checkboxes with a custom data attribute. <input type="checkbox" class="check" data-name="id" value="5"> $("input[data-name='id']:selected") and $("input:selected[...
-1
votes
0answers
14 views

Hide stray text node inside div but keep everything else visible? [duplicate]

I have this markup: <div id="content"> <p class="elem1">DON'T HIDE</p> <div class="elem2">DON'T HIDE</div> Hide this text </div> I'd like to hide the ...
0
votes
2answers
22 views

make a multidimensional array in jquery

my html code is: <input class='change_connection' name='test[connection][]' type='checkbox' value="3G"> <input class='change_connection' name='test[connection][]' type='checkbox' ...
0
votes
2answers
30 views

Show hidden div after 5 selectors clicked

I'm using jQuery Flip plugin to flip 5 cards on click (just one direction), each has a unique ID. I have a hidden div that I want to show after all 5 cards are clicked. This is my code (for example i'...
-3
votes
0answers
14 views

Popover is overflowing within modal window, it should come out [on hold]

I have a modal window and a drop down ajax popover in it. When I click on the drop down input, the popover is overflowing within the Modal window. Can anyone help me to bring it out/ Front. Find the ...
0
votes
2answers
41 views

How to add styles to only one element of a ul list

I need to add additional styles to only one element of a list depending if the string matches with the url. In this moment is identifying a unique string form a list and one element in the url, then ...
0
votes
1answer
29 views

How can I change a bootstrap class for one element which is part of a inner html?

I am making a task management web page. When a task is created, I add some inner HTML to the DOM. In the inner HTML, there is a task status label with bootstrap class = 'label label-info' by default. ...
0
votes
0answers
21 views

auto scroll selected element LI active

I have an input that works as a search engine and when digit shows an ul dynamic with the list of matches and it works. enter image description here After the list is generated, the first item in the ...
1
vote
1answer
32 views

Fetch results from json

I have a bootstrap live search for pixabay api. But I have a problem with results from pixabay. For example, I want to search images with query flowers but its returning results when i start typing. I ...
0
votes
0answers
22 views

Convert Mysql/ PHP/AJAX generated table cell to dropdown

We have a table that lists a user summary. The table itself is generated via AJAX/PHP from a MYSQL database. While the majority of the cells are contenteditable, there is a user "Role/Permission" ...
0
votes
1answer
19 views

Razor pages text autocomplete error 404 not found

I have looked at numerous examples of implementing the jQuery autocomplete feature. Most of them cause: jquery-1.10.2.js:8706 GET /AddApplication/GetURL?term=s 404 (Not Found) I'm not super ...
0
votes
1answer
41 views

How can I switch between 2 divs smoothly when clicking on a switch?

I've this switch here on my page at the top of two "pages" (divs): What I want to do now is when I press the switch, I need to show the first div when the switch is at the left and the right one ...
0
votes
0answers
10 views

Ajax github jobs call return CORS header 'Access-Control-Allow-Origin' missing [duplicate]

I'm working with jobs.github API and trying to receive JSON from the API. I tried to set dataType to JSONP and get this error: MIME type (“application/json”) mismatch (X-Content-Type-Options: ...
0
votes
1answer
16 views

How to get JSON result in grid/tabular format while calling an API?

I'm using railway API in my website and want the Train data in grid format. Please help me with the same. I want all the variables (Train name, Train number, Departure Time, Arrival Time, Travel Time,...
0
votes
0answers
8 views

File validation fails if I change file extension manually [duplicate]

I use below code for file upload validation, but if I upload a .exe file with .pdf extension, then this code is not working properly because it gets .pdf extension, but we know file type is exe. For ...
0
votes
1answer
9 views

Date range filters (Datatables) not working

I am making filters using Datatable. Datatable is working fine (Basic Functionality) but when I add date filter it does not working in fact all the data from table disappears can anyone help me out ...
0
votes
0answers
13 views

How to add X Axis legend with changing values

I have many charts and I need to add X axis to legend with change value after a mouse has hovered on the chart, is there any way how to do it simply? I must hack it with: $('.XAxis').remove(); ...
0
votes
0answers
12 views

How to use fuzziness just when the term is misspelled?

I am using elasticsearch with a fuzziness 'AUTO', what I observed is that the queries matches so many words that has no sens with the wanted ones. My question is that is there any trick to limit the ...
-2
votes
1answer
27 views

How take var from 2 identical form

I have two (2) identical forms on the same page and when I try get same var form the second form, but always get var from the first. <form id="form-vote-note-<?php echo $value->id_note; ?>...
0
votes
0answers
11 views

Checkbox checked event: Cut list element to div “A”. Checkbox unchecked event: Restore list elements and remove list element copied to div “A”

I am working on web application for cleaning company. I want to create a team of 1 supervisor and more than 1 operatives. In my code, I can add one supervisor and more than 1 operative to another div ...
0
votes
1answer
23 views

How to Dynamically Add a Class to HTML Tag by Template in WordPress

I want to add a background image to the HTML of just the default page.php and the best way would be to have a class on the HTML tag so that I could target that in the css so ideally I want to say "If ...
0
votes
1answer
39 views

Toggle Button with dropdown - bootstrap

i have a button-group with font awesome icons and a dropdown on one of them as shown in the example below. I want to toggle the button status. But on mouseout the .active class get removed ...
0
votes
0answers
34 views

how to give an error message when I do not choose any value in select?

I have a select and a button validate, I want when I do not choose a value in select and when I click on validate, to give an error message "chosen a CHANTIER", plz help. my select <div class="...
0
votes
1answer
11 views

Autocomplete does not trigger on field added via AJAX

In a web page (ASP.NET MVC) I add an input field using Ajax: $(document).on('click', '.tag-link', function () { var curRow = $(this).closest("tr"); $.ajax({ url: $("#GetSearchTagsUrl")...
2
votes
2answers
27 views

onclick radio button add number to total but adding infintely

I have this jquery code var theTotal = jQuery('.woocommerce-Price-amount.amount').text(); var price = theTotal.replace("$", ""); jQuery('input[name="dimming"]').bind('click', function (e) { var ...
0
votes
0answers
14 views

Socket.io chat app not showing messages in the DOM

I'm following the tutorial on socket.io. But I can't print to the dom. I've tried using vanilla javascript instead of JQuery but it doesn't work either. Server file var app = require('express')(); ...
1
vote
0answers
22 views

Resource was blocked due a MIME type mismatch (text/html) (X-Content-Type-Options: nosniff)

I'm developing an AJAX HTTP-POST request to an API, but I always get the following error on Mozilla Firefox: Resource “https://script.google.com/macros/s/...
-6
votes
0answers
29 views

How to use jquery drag'n'drop on mvc asp .net

I'm on visual studio 2019 I've downloaded jquery-ui-combined from the nuget package , i've changed my bundle-config.cs , i've called it in my layout i've even tried to put the google link to jquery-...
0
votes
2answers
41 views

Reveal and conceal CSS animation

So I have an animation that will reveal something, this is visible in a few places on my site. However I am now trying to reveal and conceal a modal overlay. This appears over the modal form when ...
0
votes
2answers
48 views

Add option to select with jQuery

I want to ask you, how can i implement an element into a pull down list with jQuery. I have the code below. I want to implement an <option value="fiat">Fiat</option>"> element by ...
0
votes
0answers
14 views

How to display a 3-way dependent drop-down menu in django form

I'm using Django 2.2. When registering for my project, I would like to see a drop-down list of provinces, districts and neighborhoods needed for the user's address. In other words, after the selection ...
-2
votes
1answer
15 views

How can i filter on checkbox using ajax php

I am using ajax in codeigniter, I have different checkbox now i want whenever someone checked checkboxes,result should come according to user selection of checkboxes,so how can i do this ? here is my ...
0
votes
1answer
67 views

How do I fix jQuery(“#contact_form”).validate is not a function?

We are using WordPress divi theme on our website and we have a contact form that uses jquery validation custom.js jQuery(document).ready(function() { var contactForm = jQuery("#contact_form"); ...
0
votes
1answer
30 views

Split Text from Option and replace

I am doing something in Joomla, and I have custom field to select dimension of mattress. I put the value of 220x200|image.png so I can pick image url and put it somewhere on site like example of ...