Questions tagged [jquery]

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 ...

0
votes
0answers
5 views

Position:absolute element inside a div with overflow-y:auto does not show in the desired position

First of all, sorry for the title gore, I didnt know how to put it on a couple of lines. I have this situation: The div that overflows With this element: The absolute element The problem I face is ...
0
votes
0answers
13 views

Make tab active which contains the search result in wordpress

In my wordpress site, I have few pages which have tabs. The tabs are generated dynamically from ACF repeater fields.Now, when I use the default wordpress search and the result text is inside a tab, ...
0
votes
0answers
6 views

jQuery validator custom method undefined *sometimes*

I've occasionally been getting a weird error reported in Sentry that one of our custom jQuery validator methods is undefined. However, this should be impossible - we're using webpack to bundle our ...
0
votes
0answers
5 views

DataTables.net Width not working with Sort

I am using DataTables.net to populate a table, however, I cannot get the Width option to work. I have tried several of DataTables options to do so all without any luck, so I created a CSS function to ...
1
vote
0answers
6 views

TinyMCE, JQuery capture HTML for output

I am trying to use TinyMCE to format html that can then be previewed and displayed on the same webpage. I then need to cature this html to convert the output to a JPG/PNG image. I have got as far as ...
0
votes
1answer
34 views

Why does JQuery $.post submit twice?

Why does this call my Action twice? For background, using .change only works when a user clicks somewhere else on the form. Also .change will not fire when the browser is closed. Hence the timer ...
1
vote
0answers
26 views

Jquery textbox empty function not working on html website

On my live website page here is I am facing an error that is 'I want show an alert when Name & Email textbox will empty. I am trying to solve this issue today all hours but I didn't solve this , ...
1
vote
1answer
25 views

How to show only the divs that meet all of the checkbox criteria?

With the example below, if you click on "magazine", the two "Magazine" divs appear, which is good! However, when you then click on "$19.50", the two "Magazine" divs still appear, but now every div ...
0
votes
2answers
16 views

select box add in below array how can

My array: var SHIFT_Plants = [ { Plant: 0, PlantName: "" }, { Plant: 2737, PlantName: "PM1" }, { Plant: 2738, PlantName: "PM2" }, { Plant: ...
0
votes
1answer
6 views

Magnific Pop-Up - Show different gallery depending upon image clicked

I'm trying to have 2 separate sets of images come up depending on the original link you clicked on, for a portfolio kind of purpose. <span class ="imageParent"> <a href="#" target="...
0
votes
1answer
24 views

MVC/Jquery sending AJAX response into a view

I have a grid that displays a list of projects. Each row has a checkbox with each project's associated ID. I'm trying to pass an array of each selected checkbox's value into my controller, get a ...
0
votes
1answer
46 views

How to write code for firefox click event uisng jquery

Click event is not working in firefox working only in chrome. why? setTimeout(function(){ $("#id").prev('div').find('button').find('div.classname').click(function(){ alert("Testing"); }); }, 3000);...
0
votes
0answers
13 views

Product Filter in php using Ajax + pagination

I'm trying to add pagination to this tutorial How to Make Product Filter in php using Ajax Pagination without page refresh works (so far without links). It means displays only 5 records per page, but ...
-1
votes
0answers
15 views

CSS animation starts when activating item [duplicate]

I don't get any further with my problem. .logo { margin: 10px; width: 300px; } #form:hover { animation: a0_d 1s alternate both, a0_f 1s alternate both, a0_t 1s alternate ...
1
vote
0answers
42 views

jQuery animation issue with swapping div's

I am making a script that switches the position of div's with a jQuery animation. The problem that I'm running into is that if I want to swap 2 div's from different line's, this works fine, but if ...
0
votes
0answers
5 views

Swipe idangero.us = Arrows not working - Multiple slides on one page

I am using two swipe sliders in one page, everything is working besides the arrows, they are being displayed correctly but when i click on them nothing happens. <div class="swiper-container"> ...
0
votes
2answers
24 views

JQuery Validate select element not including default value

I am trying to validate a Select element as follows: <select name="block_name" id="block-name"> <option value="">Select Block</option> <option value="blockA">Block A</...
0
votes
1answer
10 views

Replacing div with Partial View using Ajax Call Not working

So I have a 5 star rating system, and each star calls this function: function Test(ideaId, rating){ //alert(ideaId + " : " + rating); $.ajax({ url: '@Url.Action("RateIdea", "Ideas")', ...
0
votes
1answer
17 views

Why does passing a variable as an argument works sporadically where passing div tag work every time?

I have a file test.js at the top of test.js I have the following variable declared: var requiredDiv = $("<span class='markrequired'>*</span>"); I then have a function that loops through ...
0
votes
3answers
24 views

Find common keys of an array and an object in jquery

I have 2 arrays with similar values. What I want is to get the intersection of the arrays and object - The console.log of first object is - { "1221":{ "oldPrice":{ "amount":...
0
votes
0answers
8 views

How to handle synonyms in typeahead js library?

I just created a search function using the typeahead js library. My problem is that when i select an item from the dropdown list it return all the synonyms inside the input field instead of the name ...
1
vote
0answers
7 views

Magento 2 Configurable product images showing with child products

I added images in magento 2 configurable product and then I added 3 child products with images but on product detail page after selected child product it is showing both images (parent and child ...
-3
votes
0answers
21 views

Scripts are not loaded properly on server

Below code is working fine in local host but its not working on server. on clicking on status-update model was displayed,status drop-down is displayed on the model but after selecting/without ...
0
votes
1answer
17 views

How to append the Data from Top using PHP in Json file

I"m using php to append the data in Json file. It works correctly but it appends the data at the bottom. I want to add the data on the top ...such that user could see new data first. Here is my php ...
0
votes
0answers
12 views

How to set focus on element in “default” position after ajax call/update

I faced the below issue and I need to ask you for help. Below part of the code which I have: <p:outputPanel id="tablePanel"> <p:dataTable id="table1" var="record" value="#{valList}" style="...
0
votes
1answer
14 views

Vis.js Timeline is not visible if data is empty

I'm new on Vis.js and I have a trouble... When I have no data the timeline don't exist instead to have a timeline empty. With 3.10.0 version it work, but not with 4.21.0 version I hope to has been ...
1
vote
1answer
31 views

How to trigger a class that is only in view with wapoints

I have multiple sections with the class blockList li throughout each of these sections. How am I able to trigger only the current blockList li items for the ones that are in view? Currently, once any ...
-2
votes
3answers
31 views

Best way to create one to one chat application using django [on hold]

question is somehow a suggestion I saw many answers till now like using these in these answers which are well explained as well Can I use Socket.IO with Django? but I wanted to know is there a ...
0
votes
7answers
49 views

How to get only 1st element of JSON data?

I want to fetch only 1st element of json array my json data : { id:"1", price:"130000.0", user:55, } { id:"2", price:"140000.0", user:55, } i want to access the price of 1st json ...
0
votes
0answers
37 views

Functions jQuery to PHP

I have a jquery code that I seek to have in php -> My jQuery: var coolDates = [Date.parse(new Date(2018, 10, 15)), Date.parse(new Date(2018, 10, 16))]; My PHP: public static function ...
0
votes
3answers
33 views

accessing element added using jquery append method

I am appending an element to div using jquery which I got through ajax: $.ajax({url: 'api'}) .done(function (e) { $.each(e.records, function (index, value) { ...
0
votes
0answers
23 views

How to put that remote json response into JS variable?

How to put that remote JSON response into JS variable So I can then use the variable in an IF Else statement? $.get("https://api.ipdata.co/?api-key=test", function (response) { $("#response"...
0
votes
2answers
46 views

GET API always failing in HTML (Javascript/Jquery)

I know this is So simple code but somehow its not working. What I what to do is to call GET API of : https://api.upcitemdb.com/prod/trial/lookup?upc=4011200296908 I want to call this HTML by using ...
0
votes
0answers
34 views

JavaScript addClass when 50% of element visible

I have the following JavaScript that determines wether an element is visible and adds a class (which toggles a keyframe animation) to the element. However, I saw a little problem when inspecting the ...
0
votes
3answers
26 views

Looping and Calling arrays inside an array in Jquery

I am trying to call a variable in JSON that is inside an array , I want that when people search a city a modal will appear in the screen, the modal appeared but the value wont load the structure of ...
1
vote
2answers
20 views

it is good to use angularjs-datatable (Angular 1) instead of only jquery datatable in 2018?

Here is the angularjs-datatables (Angular 1) link angular-datatables v0.6.x And Here is jquery-datatables link jquery-datatables I think there are no any letest update in angularjs-datatables and ...
-1
votes
0answers
19 views

back button issue in EDGE browser

My application's BACK BUTTON working in chrome and IE but not in EDGE browser.In Jsp page i wrote input button onclick="history.go(-1)" but it is not working in EDGE.Is there any solution for EDGE ...
0
votes
1answer
16 views

Why is the reason of React's better performance over direct DOM manipulation using JQuery?

I have doubts related with DOM manipulating in reference to comparison between React Virtual DOM and JQuery direct DOM manipulation. Let's say we want to update one DOM node: A)by using React.js : ...
0
votes
2answers
28 views

Passing onclick Jquery variable issue in php

I'm working on Core php, i'm on click of div data is coming and i store a variable and i want pass check with database query it it is matching will come all the records how to do this please help any ...
1
vote
0answers
12 views

IE : Middle click on link with click onlick listener will sometime open the link, sometimes trigger the listener

On Internet Explorer 11 (not reproduiced on Chrome 69 & Firefox 61), I have a a href link with a $.click registered. Referring to my code below, using the mouse middle-click, [dossier-link] ...
0
votes
0answers
34 views

display language flag of the selected language with JQUERY

Good morning everyone!! I am trying to dynamically add the flag of the selected language a user would choose the app will allow users to select between 2 languages (English and French) right ...
0
votes
0answers
31 views

jQuery move image slider effect

I need to implement the slider effect like this site https://www.blizzard.com/es-mx/. I applied animate effect with jQuery but I'm losing the background (blank space in the right side). How can I do ...
1
vote
1answer
28 views

Jquery - blur and keyup triggers multiple times

I've got this code which enables an input, focuses on it and then triggers an ajax request when you click out or press enter. $("body").on('click', '.input', function(){ id = $(this).attr('id'...
-1
votes
0answers
37 views

writing data into JSON object and retrieving [on hold]

In login form(which contains two fields name & password and two buttons submit and display) when user enters data and clicks submit button, then the data has to get store in json file and to ...
1
vote
2answers
29 views

How do I change the division to say “Copied!” after text is copied to clipboard using clipboard.js and make it disappear after a couple of seconds?

I want the text of the 'div' to change to "copied!" for only a couple of seconds and get back the original text after that particular time period. This is a sample of the code: <!DOCTYPE html> ...
0
votes
0answers
57 views

I cannot “log in” with my script, can't find what I'm doing wrong either

So, i'm trying to make a login screen and redirect me to another page when the name etc. are correct, however it keeps me on the same page. to be honest, I have no idea where to look either, to maybe ...
1
vote
2answers
52 views

Unable to show div element on click of dynamically added li [duplicate]

I have a label <label onclick="functionCall()">All Models</label>. On the click of this label i dynamically add ul to div $("#MetricsTypeYearModelList").append('<ul class="modal__list ...
0
votes
1answer
26 views

Creating a menu that filters elements by year range

okay, I want to make a filtering dropdown menu for my website. here is what i got: <select id="typeOption"> <option value="all">all</option> <option value="type1">1<...
0
votes
1answer
27 views

Send file to output screen with jQuery

I have a form: (shortened version) <form class="form-inline" id="parts-form" method="post" enctype="multipart/form-data"> <div class="form-group"> <label for="import-parts"&...
1
vote
3answers
24 views

How to make data-modal work inside setTimeout function JS

I run into a problem, I need to use setTimeout inside another (larger) function, but this one bellow won't work if put it inside: $('#'+$(this).data('modal')).show(); How to make it work inside ...