Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
61 views

Improving the speed of loop in javascript for objects

So I have a loop that works great, but doing some testing I notice it is a bit slow. I get an average time within the loop of about 0.11 seconds. Include that with some arrays containing a length of ...
-2
votes
0answers
12 views

Creating a dynamic menu from JSON with multiple nested and sub nested objects [on hold]

The menu is building except for the section GroupName: Employment Department Reports. I create the first sublevel with the SubGroupName menu name have problem adding the reports information under ...
4
votes
3answers
15k views

Changing the background color when a link is clicked

What I'm trying to do is to change the background color when a link is clicked (in this case a list item). When it is no longer clicked, it should revert back to its normal color. I was able to get ...
2
votes
2answers
157 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
0answers
59 views

Video player UI in Javascript/JQuery

I am a Javascript/JQuery beginner working on my first ever project. Everything in this program is working as it should and I am happy with its performance. I have pieced it together from a variety of ...
4
votes
3answers
53 views

Copying and pasting one inputs value into other input with the same name

I am trying to write something that will copy the current <input>s value and enter it into any <input> that start ...
3
votes
1answer
142 views

Paginating a Backbone collection

This is part of a class for paginating a Backbone collection. The paginateTo method is for paginating to a model id. It returns ...
4
votes
2answers
27k views

Hide and show columns in an HTML table

Codepen Link I've tried to Google, but there's no library that has an API to toggle table columns when clicked elsewhere on the page, so I've decided to do this: ...
1
vote
2answers
3k views

jQuery Accordion + Sub Accordion + Search Filter

I have a top level category accordion + accordions within those and a search that auto-opens the 2 levels when results are found. Since you can't open multiple at once there is a Next button that ...
6
votes
2answers
135 views

Turtle Doodle (my first web app)

Turtle Doodle presents several panels which arrange themselves responsively. There is a canvas where the Turtle will move, leaving a paint trail behind him. A control panel allows various commands to ...
2
votes
1answer
51 views

Add or remove a class on two elements when two different events fire

I want to add/remove a class on the html and body tags in the dom when my nav menu is opened or closed. Is this the most optimal way of writing this logic? ...
1
vote
0answers
25 views

Selecting rows on condition in a table

I have a table with courses. The user that is currently logged in can mark these courses as attended and unattended. There can be multiple rows selected. The logic for this row selecting looks ...
2
votes
2answers
109 views

Toggling visibility of layers on an interactive map

I am creating an interactive quad(heat) map of USGS Quadrangles wherein each quad has 12 different attribute fields CSV attached to the JSON using papa.parse. ...
7
votes
2answers
153 views

eCommerce Mockup App in JS

I have completed this mockup eCommerce app using Javascript. This version can add products into a shopping cart and automatically calculate the order summary in the shopping cart. It can also delete ...
3
votes
1answer
63 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? ...
4
votes
3answers
805 views

Is my login system secure?

I am recently making a CMS and I need a secure login system, so this is my code. How is it? First: the HTMLcode for signup and login: ...
2
votes
2answers
169 views

jQuery animation procedural approach, suggestions need

I'm kinda worried that the way I did my animation intro is a bit too heavy and is not optimized. Please review and let me know your thoughts. ...
7
votes
2answers
544 views

Animating a block of HTML on scroll

I'm pretty new to client side scripting and I'm still learning. I've written this JS plugin which animates blocks of HTML (fade-in from left/top/right/bottom) as you scroll down the page. Everything ...
4
votes
1answer
244 views

Improving jQuery scrolldown animations

I'm pretty new to client side scripting and I'm still learning. I've written this JS plugin which animates blocks of HTML (fade-in from left/top/right/bottom) as you scroll down the page. Everything ...
0
votes
1answer
469 views

Get value from an async function in Outlook Web Addin [closed]

I'm working on an Outlook Web Addin that gets the email body. So in the Office API you could get the email body in two types: Simple Text and Html. Our requirement is to get the HTML format so this ...
1
vote
1answer
108 views

My jQuery Form Plugin

Long story short, I wrote this jQuery form plugin as an exercise to better understand how other form plugins work. If you have any suggestions about how to improve this (or my coding style in general) ...
1
vote
0answers
27 views
3
votes
1answer
39 views

Simple Form Starts Long Running Task and Watches Progress

Want to level up my skills. It hits a php script that starts a long running export that can take few minutes to few hours. The export script outputs a progress file that this form's javascript uses ...
1
vote
0answers
21 views

Subscribe once and reuse the Angular Subscription each second

I am creating a web application using Angular 8. This application is all about talking to the stock markets server and getting the Live updates every second. I have one query here. Below is my code: <...
4
votes
2answers
792 views

Delay and queue animation in a function - how can I optimise this by removing duplicate code?

I have this script that moves a box around the screen and the loops the second part of the movement. I have altered the code to drop another three boxes (4 in total) into the animation so the boxes ...
3
votes
2answers
85 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 ...
5
votes
1answer
355 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
vote
0answers
30 views

Simple jQuery calculator [closed]

I am building a simple calculator with jQuery. I can append the value to the screen and when the user clicked the operator the first values are clear or empty. My question is, how can I store first ...
0
votes
0answers
18 views

Sorting, filtering and searching a list using jQuery

This is my first time writing so much jQuery, and because of the amount of content on the page, I get a lot of the following console warning in Google Developer Tools as I'm changing filters: [...
3
votes
0answers
48 views

JS PHP insert data in database - is it secure enough?

I'm working on a webapp and I'm using js/php (php and jquery latest versions). Is there anything I should do to improve security? I'm not super worried about safety as the current users are using a ...
2
votes
0answers
97 views

Contact form with AJAX call and secured PHP with Google reCAPTCHA v3

here is a code of a simple contact form that I have created, I believe that the form is server-side protected against empty fields, header injections, CSRF, XSS, bots using 'Google reCAPTCHA v3' and ...
3
votes
1answer
61 views

Ajax function with a callback

I have Ajax function with a callback which fetches all the Patient data however I have some perfomance issues and trying to figure out what it might be, does anyone have idea? That's my Code ...
9
votes
2answers
93 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 ...
3
votes
1answer
419 views

Calling a Luhn check function when a credit card field changes

I feel like I should not be duplicating the code to gather the credit card number, but I am not sure how best to do it. Any suggestions? ...
2
votes
0answers
42 views

jQuery validation for multi-page registration form

I use JS/JQuery validation for radioboxes, input field etc. Because of AJAX I use one global validation (in a separate file) and 4-5 other files to coverage actions in a relevant registration form ...
4
votes
2answers
184 views

basic jQuery plugin template

I would like to know if I'm writing a plugin for jquery correctly. I followed the official guide and also added some tweaks that I've found from various sources over time. While this works perfectly, ...
2
votes
0answers
14 views

jQuery - Etch-A-Sketch implementation [closed]

How could I make my code follow the DRY principle? I feel like they are better ways to do things in my code. So any feedback will help me! js fiddle: https://jsfiddle.net/fr6ut238/ ...
1
vote
1answer
42 views

JQuery Selector in Vanilla JS

I've decided to reproduce the JQuery selector - specifically for finding elements by class name, ID, and tag So for example the tests could be written like ...
5
votes
2answers
235 views

BlackJack in Javascript

I have completed my initial version of BlackJack with Javascript and some JQuery. Any thoughts of this version? I can't seem still to implement timer successfully as I have commented out. After ...
2
votes
3answers
231 views

Using jQuery to set the class of an element corresponding to the selected radio button

I'm a bit of a newb with jQuery but can get it working to perform the functionality that I'm after. The below function checks the value of the radio input and then adds a class, depending on the ...
1
vote
0answers
54 views
3
votes
1answer
650 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. ...
3
votes
1answer
61 views

Whitelist for textarea and save input to file

I'm working with product codes, so a user can only scan these type of product codes into a textarea. I don't know if my code is written the best way possible, or has good performance. I'm using a ...
3
votes
0answers
40 views

Dynamic Bootstrap 4 modal using JavaScript OOP

I have created dynamic Bootstrap 4 modal using JavaScript OOP. Please verify and give your reviews how I can improve the code. I have passed four parameters to create a dynamic modal: ...
1
vote
1answer
32 views

Thoughts on using curly-brackets-less while loop with a try/catch? [closed]

I need to fetch data from an server that isn't always reliable and unfortunately fixing that is out of my hands. My team determined we would attempt the request up to 3 times. So I thought of using a ...
5
votes
2answers
173 views

Crystals Collector game with four clickable buttons

I'm a few weeks into javascript and had to make a simple "crystals collector" app. The app works as intended, but the code is obtuse and repetitive. I'd like to make the app work using just one on ...
3
votes
2answers
51 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-...
2
votes
1answer
66 views

Toggling a class in JS

I'm toggling the class of an element with this code but I'm pretty sure it can be written more efficiently. ...
2
votes
0answers
23 views

jQuery code to display images served by PHP, without reloading

My php page displays a slider of images and when the user clicks on an image(.item), the div below (#team_single) changes the content without reloading the page. Content of the div changes also when ...
8
votes
1answer
182 views

Interactive small town

I've built this simple interactive scenario. Now everything seems working fine except that when start for loop as below. What can I do to make the script faster? ...