Stack Exchange Network

Stack Exchange network consists of 174 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

Questions tagged [jquery]

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

0
votes
0answers
5 views

How to turn nested jQuery Promises into flat code structure using .done() and .then()

Below's code using jQuery promises in combination with callbacks does the following: Saves Group UUID to server using storeGroupOnServer() Creates a DOM element ...
2
votes
1answer
26 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: ...
0
votes
0answers
27 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
49 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 ...
0
votes
0answers
7 views

jQuery autocomplete : custom list (HTML, Bootstrap 4)

I have implemented a jQuery autocomplete textbox with custom list options. I'm able to achieve the expected output. But, I'm not sure about the implementation is in the right way. Can someone please ...
0
votes
0answers
38 views

Responsive Navigation Vertical Dot Bar

Responsive Navigation Bar I have just finished writing a fairly big script for a responsive navigation bar. You can see it at http://www.ainsleyclark.com It uses GSAP to link hover (desktop) and ...
3
votes
1answer
35 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 ...
1
vote
0answers
41 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 ...
0
votes
0answers
10 views

jQuery Yes/No Flowchat/Workflow

Can this be more streamlined? I like the way it works but feels like it could be optimised a bit more, not in terms of faster processing but fewer lines of code in HTML and jQuery. It's basically a ...
-2
votes
1answer
42 views
0
votes
1answer
36 views

jQuery AJAX submit form

This jQuery code submits a form using AJAX. The server response should return JSON. ...
0
votes
1answer
84 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. ...
3
votes
0answers
50 views

Client-side routing using Knockout and HTML5 History API for a single-page web application

The full question is... "Please, how can this code base or project (for client-side routing using Knockout and HTML5 History API) be further enhanced as regards security, production-readiness, ES6, ...
2
votes
2answers
85 views

Validate Email as User is typing (JavaScript)

I have the following javascript function validateEmail(value). The goal of the function is to validate the users inputted email as they are typing. So if someone puts nfg@*gmail.com the email will be ...
0
votes
0answers
14 views

Simple fullwidth dropdown menu

I have this simple fullwidth dropdown menu. If you click the second button from the left, a dropdown will ne shown. On the site I have multiple dropdowns (that bounded to id ...
0
votes
1answer
44 views

pass argument to jQuery .on() event handler callback [closed]

In my web application, a user will click a button which will call a function that triggers an AJAX call. That function accepts a single argument. I would like to be able to put that function in ...
2
votes
1answer
58 views

jQuery accordion to serve as table of contents

I'm putting together a video website for our company, with a working accordion. It works, but it using the same class name for each section creates issues with the expanding and collapsing. I found ...
1
vote
1answer
31 views

Modal displayed in Google Spreadsheet from Gscript

First: I'm not really a programmer. Thus, this application may be started in a bad way, but here is my question. It's not a specific one because I have no real clue about how to improve my code. Let ...
-2
votes
1answer
47 views

DRYing up functions [closed]

I have three functions that follow up the same pattern, can anyone give me an idea on how to make this code DRY? The child element with the css styles applied is not a child element, it is found way ...
8
votes
2answers
215 views

PHP Chess Version 2

For programming practice, I created a chess program in PHP (my most comfortable language). The program reads a FEN (a string with the location of all the pieces on the board) from the URL, generates ...
2
votes
1answer
377 views

Send blob image using Ajax/PHP

I have an image cropper that crops the uploaded image, Before sending it to the server using PHP and AJAX. Here is a live fiddle to preview a working cropping example. Here is the code: ...
3
votes
1answer
290 views

jQuery image carousel

I have made this custom image carousel, using HTML5, jQuery and CSS. My aim was to make it really lightweight but with (just) enough features: "bullets", auto-advance, responsiveness. ...
0
votes
1answer
28 views

Creating a popup of a modal with output

I'm trying to create an if-else statement that pops up a modal with output in the body, and if there is no input detected then ...
2
votes
2answers
35 views

Basic jQuery hide/show code

My code works perfectly but it is redundant. How does one condense this? How do you use the =! operator? Any help would be greatly appreciated. ...
2
votes
1answer
37 views

jQuery plugin to load a full-page view window

I am writing a lot of jQuery plugins lately, but I don't really know if what I am doing is any good. Here is one of my most recent plugins, this allows you to add a data attribute to any class and ...
3
votes
1answer
169 views

JavaScript responsive menu (dropdown/dropup)

I have the following front-end code for a responsive navigation menu which I thought using in my WordPress website. Clicking the .burger element should cause ...
-1
votes
1answer
22 views

Shortening jQuery 3 way selects (+class toggle)

on a change of first select, second select options are being dynamically changed. How can I shorten it (jQuery or vanilla JS)? It is 3 way street - therefore class toggle is not an option? ...
1
vote
0answers
37 views

Shopping cart to pdf generator

So I'm working on my website which is done though 3dcart, in their infinite wisdom for some reason I cannot work on anything to do with the backend (no database interactions or anything), so this is ...
1
vote
2answers
107 views

JavaScript calculator that only adds numbers

This is a JavaScript calculator that uses JQuery and bootstrap. How can I improve the CSS, HTML, JS and the general design? ...
2
votes
1answer
76 views

Tampermonkey script to beautify related tags in Stack Exchange

I've got the following code which is ran inside tampermonkey (It's a userscript), but there is a variable that is being declared, used, then overwritten by the next line. I'm looking for a way to ...
0
votes
1answer
37 views

Select a location on the map depending on which button is clicked

I have code like below. By default the location is myloc. When user clicks btn-a it selects ...
4
votes
2answers
53 views

Dynamic country, state select options

Here is code to dynamically choose between three country options (United States, Canada, Other). After the user selects a country it will show the related select option or an empty input (when "Other" ...
1
vote
0answers
32 views

Slider that increased center slide width. (Slider plugin suggestions)

I wanted to create slider when it slide center slide width must have incresed and the two slide next to it stay on normal slide. I have tried one using slick slider. Here is the code pen link that I ...
0
votes
0answers
124 views

Fit text in a textarea with textarea or div with contenteditable

After a lot of testing I've reached this solution to fit text into an editable container with automatic height. I started with a textarea and javascript but it got extremely slow on hundreds of ...
2
votes
1answer
45 views

Simon Says implementation using jQuery

I would love to get some feedback on my implementation of "Simon Says." I have not followed the original in that I have created a new sequence each time, rather and adding a new item to the pattern. ...
3
votes
2answers
36 views

jQuery handler to update map UI based on AJAX response

I am working on a university project that consists of creating a map application with openlayers as well as the necessary User-Interface. I am using jQuery, native JavaScript, PHP and of course HTML/...
3
votes
2answers
44 views

Making the font as big as possible without overflowing each div

I made a function that makes font sizes in <div>s as big as possible without overflowing. It takes a long time to run. How do I optimize this? ...
2
votes
2answers
56 views

Update game content via AJAX

On my application, I have a JavaScript cycle that updates tag contents on my page regularly: ...
0
votes
1answer
17 views

Click a link to delete targeted content using Ajax

I wrote a glypicon as a link to delete a comment: ...
0
votes
0answers
28 views

Functions to Add Images to a FabricJS Canvas

I have a small application with the following functions that I use to add images to my FabricJS canvas (FabricJS v. 1.7.2). I'm using jQuery 3.3.1. Looking to improve my code. What do you think? <...
0
votes
2answers
48 views

jQuery function to display an alert when submitting blank fields

I am new to jquery and implemented following function in a js file in case of error- ...
0
votes
0answers
43 views

Rendering Backbone View with Dynamic Templates Asynchronously

I need suggestion and review on rendering of navbarView and other views in a prototype single page application which I'm developing as a side project. This is the ...
0
votes
1answer
32 views

Simple AJAX view loading approach

I'm writing my own MVC framework for learning purposes. Usually in my projects I like to use AJAX to send requests and retrive data. Now my doubt is if this can be ...
4
votes
1answer
60 views

Three versions of a counting-up timer in JavaScript

I made 3 versions of a counting-up timer in JavaScript: Version #1 All units of time (seconds, minutes, hours, and days) are updated every second, whether they change or not. Pro: Shorter code. ...
2
votes
2answers
99 views

Fading HTML elements in and out after timed delays using jQuery

I recently launched my first website, and despite being very proud of how far I've come, I know that my code is more "I got it to work" than "It works the best that it can." I'd like some criticism, ...
2
votes
1answer
76 views

CSS/JS slider using just data-attributes and transform:translate

I needed to make a multi-page form, with slides, but without using too much js code like slick.js or the likes. So I tried to figure out how to make it really simple, but still cross-browser and ...
2
votes
0answers
22 views

Range value selector jQuery plugin

In need of making a range selecting feature I made my first jQuery plugin. I tried to mimic the structure from some open-source plugins. I wonder if this can be improved. Here is the source code: <...
0
votes
0answers
159 views

Fetching and displaying API data as an HTML list

I've written the following which works but it's the first API I have written and I just wanted to see the general opinion of what could be done differently in a better way so I can learn more and ...
0
votes
0answers
31 views

Creating a page of forms dynamically

I have a situation where I want to give a client the ability to edit entries in a Firebase database. I don't typically work on web stuff so I'm using my very limited knowledge to create the simplest ...
5
votes
2answers
75 views

Web ToDo application in JavaScript, HTML, CSS

I would like to share with you the code from the application I just finished. It is a web application written in HTML, CSS, JavaScript and jQuery. It uses ...