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.

-3
votes
0answers
24 views

how full page persian number [on hold]

After running the page This code does not work on Google Maps ...
-5
votes
0answers
40 views

first website is online now, any opinions about it [on hold]

my website is online now, i have been working on this for 10 months after i come back home from work and in the weekends and holidays. It was a great process in which i developed my skills especially ...
1
vote
0answers
35 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 ...
0
votes
0answers
36 views
+50

jQuery Slideshow with pagination

The code below is for a slideshow that shows an .active slide, pre-loads a .next slide, and holds the ...
1
vote
4answers
50 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 ...
0
votes
1answer
28 views

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

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
29 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
108 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. ...
2
votes
2answers
59 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
69 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
46 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
23 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
44 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: ...
1
vote
1answer
47 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
23 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
42 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
0answers
65 views

Splitting jQuery code into reusable modules [closed]

I am in the middle of php app development with some addition of js. Since my JS knowledge is not particularly good, I rely on jQuery. However, I like to work with reusable code rather than spaghetti. ...
1
vote
1answer
44 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
48 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
69 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
59 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
40 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
57 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
43 views
0
votes
1answer
44 views

jQuery AJAX submit form

This jQuery code submits a form using AJAX. The server response should return JSON. ...
0
votes
1answer
86 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
66 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
94 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
1answer
56 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
115 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 ...
2
votes
1answer
47 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
48 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
227 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
1k 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
386 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. ...
-1
votes
1answer
30 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
40 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
47 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
186 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
25 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
48 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 ...
2
votes
2answers
123 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
82 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 ...
-1
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
61 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
39 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 ...
2
votes
1answer
46 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
41 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
45 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? ...
3
votes
2answers
63 views

Update game content via AJAX

On my application, I have a JavaScript cycle that updates tag contents on my page regularly: ...