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.

Filter by
Sorted by
Tagged with
0votes
0answers
4views

Default Selected Value Dynamically

I want to select "United States" by default in the dropdown. I tried with trigger event but not working. I am new to JS. $(document).ready(function() { var isoCountries = [ { ...
user avatar
0votes
0answers
4views

How to posititon text in a slick slider and ensure it does not move around

I'm currently trying to overlay text over the image in my slick slider, however even though I have overlaid the text when I resize the window the text seems to move around in the image. How do I fix ...
user avatar
0votes
0answers
14views

Why does my "functions and var" in js file not loading?

I have linked all files correctly but it still not working, I don't know If I added the wrong codes in the js file or not I linked the JavaScript file to the HTML file, but the functions don't appear. ...
user avatar
0votes
0answers
19views

jquery show div if results returned in search

I have below tab in html which show search bar with results and allow user to search from there ,if user enter text it start search from that particular word now want to show only search bar once user ...
user avatar
  • 45
1vote
0answers
19views

Javascript: How to display all data

I can get the data from my query, my problem is it displays only the last data, I hope you all understand what my problem is, this is the data <script> let myPromise = new Promise(function(...
user avatar
  • 279
-1votes
0answers
13views

How do I convert a getJson Obj into an array? [closed]

I use the openmaps json response to get the border of the city of phoenix. Heres my code: var phoenixbounds = []; $.getJSON("https://nominatim.openstreetmap.org/search.php?q=phoenix&...
user avatar
1vote
1answer
20views

Remove .php extension from localhost url using split jQuery

Now my url is http://localhost/try/aaa/index.php from this link I want to remove .php extension bt using split jQuery. After removing th extension my url look like this my url is http://localhost/try/...
user avatar
0votes
0answers
18views

How to increase quantity of each item and calculate price in cart using php? [closed]

I want to increase/decrease quantity of a particular item in my shopping cart. But when I click the confirm button, the quantity of all items are changed then the price and total of other items are ...
user avatar
  • 1
0votes
0answers
13views

How we can remove .php extension in jquery?

# var firstQuestionMark = url.indexOf('?'); var parts = [url]; if (firstQuestionMark !== 1) { parts = [url.slice(0, firstQuestionMark), url.slice(firstQuestionMark + 1)]; } var basics = parts[0]...
user avatar
-2votes
0answers
26views

Error with for each function ($.each) in console log

I am trying to write javascript that will output the data from my JSON code. I have three arrays in my data set with different values. I want the javascript to go through the JSON data printing out ...
user avatar
2votes
1answer
17views

How to display a video template if a "video" field exists in firestore?

Hello I'm trying to display a video using template literals everything is working fine but now I wish to hide the template if the video field in firestore is empty or doesn't exists If the field ...
user avatar
  • 55
-1votes
0answers
32views

How do I implement AJAX into a PHP user changing password form?

I have a small password reset form that is accessible to the user on their user account page once they have successfully logged in. I want to implement JQUERY AJAX so that the page doesn't refresh but ...
user avatar
0votes
1answer
43views

How to display data inside the script?

This is my current code, the problem is I dont know how to return the value, i dont know why the author from my function are undefined, what i want is to get the data from my query and pass it to the ...
user avatar
  • 279
-1votes
0answers
19views

Replacing multiple HTML elements using Jquery

In the following example I am trying to update the value of #viewer_campaign3 with new data and move the older values to other HTML elements. But I think what happens is that I end up overwriting the ...
user avatar
  • 1,311
0votes
0answers
7views

Target Label within TD based on Next TD [duplicate]

I'm trying to add some jQuery to a page to change the label text on a 3rd party page. I can't control the poor HTML on the page but can add javascript to achieve the result. The HTML looks like: <...
user avatar
0votes
1answer
9views

How can I run a callback after Bootstrap initializes a plugin from data attributes?

I have a Bootstrap 4 radio button group. I want to make a state selection based on stored data at page load. If I do that in my script it runs before Bootstrap's initialization of the toggle plugin. ...
user avatar
  • 51.6k
-1votes
1answer
16views

Jquery Problems with set an id attribute and use the id for a scroll function

I made a simmple example at fidle. https://jsfiddle.net/johi123/0xdvq3wp/10/ from my project: Always say me there is no id set. url:https://hiti-seo.com/seo-suchmaschinen-optimierung/news/seo-news....
user avatar
  • 13
0votes
0answers
12views

Offcanvas Menu close with the same button

i hope you can help me with my problem. I built a offcanvas menu with this example: Bootstrap Off-canvas Menu and Sidebar with or without Overlay The only difference is, that the button, which opens ...
user avatar
  • 1
0votes
1answer
21views

jQuery anchor links toggling a menu?

I used jQuery to make a toggle menu where someone can click on different span titles to toggle between different containers of content (on the website, this toggle menu toggles between different ...
user avatar
-2votes
0answers
10views

Javascript: I cant assign data loaded with AJAX HTTP GET method to properties that were defined in constructor of a class [duplicate]

Im trying to save data loaded from HTTP get method into a class's properties to work with the data later on the website. I can use the data only within the $.ajax(success: function() {}) , I cant save ...
user avatar
  • 17
1vote
1answer
36views

Add class to one div when another is in the viewport

I have a website using vertical scroll snap. The website is divided into full width and height sections and I would like to style the navigation and other elements depending on which of these sections ...
user avatar
  • 194
0votes
0answers
9views

Flask WTF Bootstrap-table icons not showing

I am developing a web application with Python and Flask. For the front end I use Flask-WTF and Bootstrap. I am now working on a table using "bootstrap table". I'm making good progress but ...
user avatar
  • 11
0votes
0answers
5views

How to automatically activate Wake Lock API on page load?

I found this script several months ago that allowed me to have a simple wake lock feature. However, I couldn't make it work to be automatically active upon page load, instead of having to check two ...
user avatar
  • 389
0votes
0answers
8views

Datetimepicker client side validation for start and end date

I have 2 datetimepickers that I'm using and I'm setting the default date on each of them when the page loads. One is the start time (#datetimepicker1), the other is the end time (#datetimepicker2). I ...
user avatar
  • 69
-2votes
0answers
24views

I am trying grab data from a json file. The array that is only integers messing me up

I need to get to the image and title that live in side the Array(50). response: count: 50 result: Array(50) 0: {syndication: Array(2), pubstatus: 0, nid: '51328', taxonomy: {…}, published: '2022-03-...
user avatar
0votes
1answer
11views

how to add an eventListener after looping over the fetch function in jQuery

I am struggling put an event listener to 'readMore' and 'readLess' link after loading the page I gotta render the page first with the data from the local storage which is saved in another page. What I ...
user avatar
1vote
2answers
46views

Setting an input element property value to default

On a HTML page i have an input with a value attribute which is changed by some library i use. After the user changes the value of the input the value property is changed. After some action i want to ...
user avatar
  • 380
2votes
3answers
46views

How to CSS style an element, when an other specific element is following?

I use the Shariff solution with an statistics backend to provide visitors with an easy way to share content on social media. Based on the data from the statistics backend, Shariff will dynamically (...
user avatar
  • 2,990
0votes
1answer
24views

jQuery .on('submit', function(e) how to add extra input value + checkbox validation

I'm building a simple form but I'm stuck: if I send only the email field, the form validates the email and sends it if I add two fields I can't get it to work: name checkbox (GDPR) I need to add the ...
user avatar
  • 1
0votes
0answers
15views

jQuery document on change for checkboxes and select options doesn't work

I'm having trouble with a (document.ready) on change function. It should get triggered when checkboxes are checked or when option elements from a select field are selected. Everything works just fine ...
user avatar
0votes
0answers
7views

Playing a sound from a moment

Actually the thing i want is play a sound from texbox's value Ex: user writed 01:05:08 the sound start playing from 01:05:08 moment. This is what i want. Can anyone help me? (Note: İ don't want use ...
user avatar
0votes
0answers
14views

How can I stop ajax .on("click") doubling/flickering with each click?

Can anyone see a problem with my calendar code please? My issue is with the prev and next links. Without the .off("click") they work initially but then the code seems to double each time ...
user avatar
0votes
0answers
12views

"Show" button doesn't work with JSON file data [duplicate]

I want something like this:https://codepen.io/cosminach/pen/ExoWPwN In that codepen, when you click on the button, text is shown, and it works. <div class="wrap"> <button class=&...
user avatar
0votes
2answers
39views

Responsive navigation toggle

I have been working on my portfolio website and I can't get my responsive navigation working properly. The normal navigation works fine, but the responsive navigation toggle menu presents issues. When ...
user avatar
  • 11
0votes
0answers
18views

How to make this screen stretch effect with HTML + CSS + JAVACRIPT

How do I do this effect on a mobile-friendly website? Example
user avatar
0votes
0answers
6views

Continuing submission (using second submit button) of a form after using Ajax to prevent default and do a calculation

I am using Ajax to prevent the default submission of a form and perform a calculation via a post route. Once the ajax request has been completed, it maybe required to actually submit the form to the ...
user avatar
  • 1
0votes
0answers
6views

Trigger Click on Dynamic/ Relative Parent Frame Modal Button from within an Iframe

On this page I want to trigger a click on the home button from within the iframe, by both a click trigger and timeout trigger. The home button can be found by navigating into either category Then ...
user avatar
0votes
0answers
9views

Laravel 8 backend doesn't answer to following AJAX queries until first (long) one is done

I have this JQuery code to call two kind of AJAX requests: one to start for execution of a long process, and the second - setInterval-led - one to request about the process status. // Ajax avvio ...
user avatar
0votes
0answers
17views

Status on AJAX request hanging

I have a button when clicked send an ajax request to fire a PHP function which takes a while for it to complete. I have a timed function that checks the status of the first function. The problem being ...
user avatar
  • 1
0votes
0answers
9views

Ajax overwrite serialized data

I want to overwrite a serialized json array from a form, and for every user input in the json array I want to transform the user input : from this { incident: [ '112', '911' ], //... to this one : ...
user avatar
1vote
2answers
32views

Jquery can't trigger keyup event

I'm using jquery in a web app. I have a page which is listening for keypresses like this: document.addEventListener('keyup', function (event) { event.preventDefault(); var key = event....
user avatar
  • 31.5k
0votes
0answers
6views

how to get start and end dates to appear on a leaflet slider

I have a slider with a range, similar to this posting and am trying to basically replicate their solution to have two elements holding the start and end date on the end of the slider, but cannot. When ...
user avatar
0votes
1answer
22views

jQuery multiple pseudo :not selector with descendant combinator

I have some markup like <div class="a"><img></div> and <div class="b"><img></div> I need to dynamically wrap img with a div and use $(":...
user avatar
  • 473
0votes
0answers
10views

WP Ajax Load more button returning empty string

I'm trying to follow this tutorial to add a load more button to a site I'm working on. tldr: Ajax request just printing <empty string> on success and failing to render anything to the page So I'...
user avatar
0votes
2answers
34views

Cycling through elements periodically

I've found plenty of examples to show/hide divs with a timeout in JavaScript, but I can't seem to solve my exact issue here. I have six divs. I want to cycle through from 1 to 6 and then all over ...
user avatar
  • 4,573
0votes
0answers
18views

How to change the entire li css after menu aria expanded using css, javascript and Jquery?

I am trying to change the entire li css, after aria-expanded=true. For example I have attached the image below. I am displaying like this What I need is, I have to display that list after clicking ...
user avatar
1vote
1answer
22views

whenever I click on a menu item i want all the other head menu's to be invisible

okay so i have been trying to figure this out for a while now. but i want all the head menu's to be invisible whenever i click on a head menu. so if i click on discord menu. i want the other menu's to ...
user avatar
-1votes
0answers
11views

Does anyone know of any good Swipe JQuery library?

I found this cool website where the programmer demonstrates a swipe left/right functionality on the page as seen in the illustrations below. I would like to implement similar in my web app. Does ...
user avatar
  • 1,434
-1votes
0answers
22views

cannot multiply between two table

I have a code which will update database when change, however, I can multiply within a table, but it doesn't work when I try to multiply with the other table. anyone can help with this? i am trying to ...
user avatar
  • 41
-1votes
0answers
10views

Uploading excel in angular with date value

After uploading excel the date gets changes to some number value. I want the uploaded date should be available in uploaded data. stackblitz link Angular file upload with date value Image after ...
user avatar

15 30 50 per page
1
2 3 4 5
20560