Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [jquery]

A JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

1
vote
0answers
17 views

Sliding marker on link hover and click with jQuery

The code I'm bringing forward is for a vertical menu, where I needed a marker to do the following: When hovering over a link the marker should slide down next to it. When not hovering over a link the ...
2
votes
1answer
25 views

Edit button toggles modal and load data from PHP using AJAX and JQUERY

I've been working on an edit/update button that will toggle a modal that looks like this: Is there a better code for this JavaScript code that I made? ...
2
votes
1answer
22 views

Rendering elements (which can change numbers) using jQuery

Currently when the user selects some tags in my app I generate them in a function, like this: ...
3
votes
2answers
36 views

Sliding marker on link hover with jQuery

The following code is for a vertical menu, where I needed a marker to slide down next to a link upon hovering over said link. Therefore I needed to change CSS properties of a HTML element (the top-...
6
votes
1answer
40 views

Fetching movie data using jQuery

Requirements Display movie datas inside all tags that have the class movie_list Make an ajax call for fetching movie datas Fill loading text before fetch data If any error occurs during loading, the ...
0
votes
1answer
61 views

When is using try { } catch appropriate and when is it just lazy? [closed]

I am using the following code to get a selector from the user and test if the selector is valid (i.e. returns at least 1 element) ...
2
votes
1answer
44 views

Fetch text values from JSON and Display pop onclick text

I have below code which will fetch the text from json & onclick text , display pop up box in page.... Now i need to give options to change font-family, font color.... But Adding the code in the ...
1
vote
1answer
34 views

Loop through data layer and display dynamic content [on hold]

The purpose of the pricingTest object is to grab pricing information from the dataLayer on the page and render content blocks accordingly. My goal in posting this is to hopefully receive some feedback ...
1
vote
1answer
93 views

User upload & Drag image and update text

I am allowing user to upload images & drag uploaded image once user click on mask images, also gave an option to Edit the text.... I am fetching mask images and text from json file.... I am ...
0
votes
1answer
80 views

Updating values in a database

I'm using standard jQuery Ajax to update values in the database and reflect the result in an output. This repetition seems like bad practice and I don't know enough about jQuery to consolidate this ...
1
vote
1answer
61 views

Edit and delete uploaded images code inside script tag

I am Displaying mask images & allowing user to upload the custome image inside mask image, now i want to give an option for user to Edit & Delete the Uploaded image.... Video link : https://...
2
votes
2answers
43 views

jQuery redirect form

I'm using jQuery to create a (hidden) form that redirects people to another page using JavaScript. ...
1
vote
1answer
39 views

Switching to next select field by class of parent

This emulates behavior of tab and shifttab with → and ←. I.e., switch focus to the next/previous select field with parent class ...
1
vote
0answers
27 views

jQuery plugin linked with dataTable

I have no problem, but I would like some advice: I've read some help to do some jQuery plugin, and I just did my first one. This plugin helps to generate dynamic datatable: Autofill the table with ...
1
vote
0answers
13 views

Load more and filtering - WordPress AJAX

In my WordPress theme I have built a function that uses Isotope Layout by Metafizzy to accomplish filtering and sorting. I have used a mix of AJAX and JQuery to accomplish this, however I feel the ...
0
votes
0answers
29 views

Showing and hiding information with photos

I have been given an extremely loose design to follow: a page must show people's photos and name in a text overlay over the image, and when clicked a bio shows below. Must Haves Photo, text overlay ...
-2
votes
1answer
39 views
1
vote
1answer
48 views

Upload and drag the image inside a mask image

I am allowing users to upload and drag images with this code. Give me a review of this. Codepen ...
3
votes
2answers
72 views

Use weather API to get information in JavaScript + jQuery

Please can any code experts review and improve my code? HTML ...
0
votes
0answers
11 views

Collapsible left-side tree

I was wondering if there is a better way to write the following code? The code is working, I am looking for better technique to achieve the functionality, if any exists. Never mind the classes that ...
1
vote
1answer
46 views

When slide show web page is reopen, the web page loading is very slow

Here is a script that opens about 200 pictures, the first time you open the webpage, loading of the 200 pictures is fast, However if you reopen the page, it takes about 4 minutes to load the same page ...
1
vote
0answers
20 views

jQuery plugin for allowing only digits to be entered in html form input

I wrote this small jQuery plugin to set some fields so that they allow only 0-9 digits to be entered. I intended to do that by preventing user from typing, pasting or dropping non-digit content. It ...
2
votes
1answer
92 views

Symfony AJAX comment system with votes

How can I improve this code ? It was quite hard to implement AJAX comment system in Symfony 3, and result is a bit of mess: Controller: ...
0
votes
1answer
82 views

JavaScript Tic-Tac-Toe

The first function makes 2 players ...
0
votes
1answer
69 views

On form inputs focus, show div. hide div on blur for multiple inputs and hidden divs

I posted a question on Stack Overflow and got an answer that works but has a lot of duplicated code. In the future, the functionality may also require a third or more divs to be shown or hidden. The ...
2
votes
0answers
61 views

Python/Django Class based saving

I'm creating multiple Django apps with vote possibilities, so I made an app vote to handle all this votes. In my templates I'm including an ajax-function named <...
1
vote
0answers
53 views

Sorting options within a select element

I am trying to sort the options within a SELECT element. I wonder if I am doing it stupidly or not, so perhaps someone can look ...
1
vote
1answer
155 views

jQuery Slideshow with pagination

The code below is for a slideshow that shows a slide with class active, pre-loads a slide with class next, and holds the slide with class last in the background. My biggest issue with this is there ...
1
vote
4answers
71 views

Replacement function for jQuery .post

Today I just completed a personal POST function that emulates jQuery's using $.ajax, but also implementing a possible redirect. I just finished up and it looks like it is functional, but since this is ...
1
vote
1answer
33 views

A simple jQuery function that removes empty or tags containing just '&nbsp;'

I've made a simple function, this time in jQuery rather than JS, that just removes empty <p></p>, span and strong tags. I'm curious to see what everyone ...
1
vote
1answer
76 views

Unsplash jQuery plugin with callback functionality

This is my first attempt at a jQuery plugin and really doing anything with jQuery which isn't simple DOM manipulation or initialising another plugin! I'm really keen to learn where I have gone wrong ...
1
vote
2answers
136 views

Simple menu with descriptions

If one menu-item is clicked then the description with the same data-filter attribute should be shown. I added a class to the description elements to associate each one with the affiliated menu item. ...
3
votes
2answers
63 views

Displaying information extracted from an HTML table

This function below (used on a timeout due to my page loading time) displays information on my site. I grab this data from my table view that I load into the page. It is launched by clicking a button ...
1
vote
2answers
75 views

jQuery code to detect whether form fields have the default value when a checkbox is unchecked

How could I rewrite this jquery code to compact it in a more elegant form: ...
2
votes
0answers
91 views

Simple jumping game: continue with jquery or switch to html5 canvas?

I'm coding for fun with the secret ambition of making a fun little game for mobile. So I started out building this little jumping game with Javascript and jQuery. The game relies heavy on css ...
1
vote
0answers
36 views

A Ruby on Rails controller and JS code to add labels to products, like Gmail's labeling tool

My friend asked me to write a tool that lets users bulk add/edit labels (taxons) to store (spree commerce) products. I came up with this, curious to know if you guys find the code readable/...
0
votes
2answers
56 views

Simple cube that moves around the container with keys

I made a basic cube that can move around of container and jump too. It's basic but I want to know if I can use better methods, better formatting, or shorten the code. This my HTML: ...
2
votes
1answer
122 views

Notification system using PHP+jQuery+Ajax

I have this code to display a counter on the side of <i class="fas fa-bell mr-3"></i>. I want to know if this code is good on security and perfomance. ...
2
votes
1answer
35 views

Note Tool - Fill text box with template

I've been working on a note tool for my company to help streamline verifying and noting accounts. I've added in extra features that help with different aspects of the job as well. I'm wondering if ...
1
vote
2answers
53 views

Replace string of class of button by class so that only one button is filled in using bootstrap buttons

I'm using bootstrap buttons, and in this case I have 5 different buttons with 5 different classes. When one of the buttons is clicked on, I want it to be the only one filled in, and the others to only ...
1
vote
1answer
49 views

Turning nested jQuery Promises into flat code structure using .done() and .then()

This code uses jQuery promises in combination with callbacks does the following: Saves Group UUID to server using storeGroupOnServer() Creates a DOM element for ...
2
votes
1answer
135 views

Image carousel with jQuery 3.3.1

I'm trying to make a carousel with jQuery and I want to know, how to simplify the code further? so... this is my code: ...
1
vote
1answer
120 views

Unidirectional Bootstrap 3 carousel

I am working on a custom Bootstrap 3 carousel, with vertical, unidirectional, slide transitions. I want to prevent slide transitions from overlapping when the bullets are clicked in random order and ...
0
votes
1answer
65 views

Checking if an array element exists in a JS object

I have a feature in my application that should allow users to select items in a drop down menu and move them up and down. Once they select and click on the button I have to loop over the array of ...
3
votes
1answer
46 views

Ajax table action and process

I'm trying to learn Ajax better, and I'm developing an application in CodeIgniter. The following code is working, there are no errors. But for every function and call I think I'm repeating callbacks ...
4
votes
1answer
106 views

Effective to-do list in PHP and jQuery AJAX

I made this to-do list since I never seriously used jQuery (in particular way AJAX) and I need this kind of script for a project that I'm working on. Principal features: Use of a database to manage ...
-2
votes
1answer
45 views
0
votes
1answer
69 views

jQuery AJAX submit form

This jQuery code submits a form using AJAX. The server response should return JSON. ...
0
votes
1answer
88 views

Creating dynamic table rows

I would like to know how to make this faster. It's okay for 100 rows but 1k, 10k, 100k is different. ...