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
1answer
18 views

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

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
30 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 ...
0
votes
0answers
14 views

When equal Title and Text, hide an element [on hold]

I would like to hide an element when a title and a text are equal. I should hide the slide that has the same name as the page. I'm doing it in the revolution-slider. I'm doing all this inside a ...
1
vote
1answer
24 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
44 views

DRYing up functions [on hold]

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 ...
-1
votes
0answers
15 views

AJAX form validation in Django Template [closed]

I am practicing AJAX in django template project, i have a signup form where i have 4 fields to submit,i'm using signup button feature to implement ajax function,its working fine, but problem is when i ...
8
votes
2answers
196 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
48 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
216 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
27 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
33 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
30 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
152 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
27 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
87 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
67 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
49 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
9 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
46 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
42 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
29 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
42 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? ...
1
vote
1answer
40 views

Updating tag contents on my page

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

Click a link to delete targeted content using Ajax

I wrote a glypicon as a link to delete a comment: ...
0
votes
0answers
19 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
47 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
27 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
81 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
48 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
21 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
156 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
30 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
73 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 ...
2
votes
0answers
74 views

A simple “couple creator”

I just made this simple generator as a side-project to one big project I'm working on (demo on github pages here) and would like some opinions, feedback or suggestions on how to improve it. I hope you ...
0
votes
0answers
18 views

Jquery AJAX client side controller design

I'm working on the client side of a webapp. I've already posted the PHP logics here on codereview and your suggestions have helped me to improve a little bit the code. I'm using ...
3
votes
1answer
63 views

on() event handler for multiple objects [closed]

I'm using three instances of ace editor in a form. I initialize them like so: ...
2
votes
0answers
38 views

jQuery animation tab slider

I'm a beginner in js and jQuery. I wrote animation tab-slider. But my code is bad. What should I improve? What should I do to make the code less cumbersome? ...
0
votes
0answers
15 views

Navigating Through Calendar Weeks

I'm displaying a week-long calendar with "previous" and "following" links: ...
0
votes
0answers
8 views

Getting static image MapBox

I using map box to get static image of city Here is my script ...
3
votes
4answers
93 views

Simplify form validation with function

In jQuery, I have been reluctant to create a better form validation, and I feel the time has come for me to do so. With that said, I have been using this particular type of form validation, and I ...
0
votes
0answers
17 views

Unify code that works with selectmenu

I have span and select in my view Here is code of it ...
0
votes
1answer
233 views

Handling keyup events with throttle or debounce in Javascript/jQuery

In my web application, there is a search input field, and when the user empties all of the text inside the input field, there is an API call made for a default-list of results, which are displayed in ...
5
votes
1answer
55 views

Get lines numbers of text spanning across a set of paragraphs using JavaScript / jQuery

My goal is to work out which lines a piece of text is on within a set of paragraphs. For example, in the image below: I want to find text starting from "Maecenas non" to the next instance of "nisi" ...
2
votes
4answers
204 views

Set of jQuery .click functions

Restaurant Menu It works how I want it to, but the way I've written the jQuery looks like it could be simplified. How can I rewrite the jQuery so it does exactly the same thing but in much less code? ...
6
votes
1answer
76 views

Branding Roses & Tulips

The logic is like this: All brands have 2 products (Rose and Tulip) Each brand names their product name differently (such as Brand 1 names their rose as No. 1 Rose and Brand 2 names their rose as No. ...
2
votes
2answers
55 views

Manipulating the browser history

I created a table with the ability to edit with popup. This part of the code, which includes: the ability to send URL to other users with the subsequent opening of the same state (the popup window ...