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
1
vote
1answer
11 views

A more elegant way of adding option data to a dropdown box using jQuery

The code I have below is currently what I am wanting to see if I can shorten. The code works as-is right now but I don't like the face that each IF statement has its own $each loop in it. ...
0
votes
1answer
80 views

Building user friendly inputs on a mobile device

I am working on an e-commerce website. The home page has 2 inputs: Looking for and Location. The user would enter their desired product and location and click on Search as shown below: The first ...
-1
votes
0answers
17 views

I wanted to add the class colorChangeOnMouseOver to these elements [closed]

is there any way i can optimize my code using loops or something like that? ...
1
vote
0answers
33 views

Chess quiz web site

I'm working on a personal project to build a website that quizzes users on chess opening theory moves. I know my code is not very object-oriented but I am working on refactoring it right now. I just ...
1
vote
0answers
11 views

Here's my attempt at a Volumetric Weight Calculator (in cm). How did I do?

So, I've written this small calculator for computing the volumetric weight of a parcel. I've been trying to kick some bad habits to the kerb lately so I was wondering if I could get a code review. ...
0
votes
0answers
13 views

Set cookie once modal opens on page scroll

So I am still learning a lot of things and wanted to see if someone wanted to look over my code and tell me if there are ways to improve things and maybe make the code a little cleaner. Here is what ...
0
votes
0answers
11 views

Stopping WOW.js animations from happening when the element is positioned before the current scroll position

I have been using WOW.js to animate my elements for some time now. I've noticed that when a page visitor reloads the page, animations that have already "been scrolled into view" by the ...
0
votes
1answer
31 views

HTML table with repeatable rows and live-calculated column totals with row grouping indication

I created a quick "demonstration of proposal behavior" tool for my post on MSO: A proposal to put ALL answerers on a path to curating better content. Because I have never asked for a review ...
1
vote
0answers
22 views

Mix JavaScript debounce (not plugin) with jQuery event handler?

I asked this on StackOverflow and was directed here... Instead of including a debounce plugin library for a very small form section of my site, I've implemented some of David Walsh's JavaScript ...
2
votes
0answers
27 views

Splash Screen Library in jQuery

I have created Splash Screen Library in jQuery, The Splash Screen will display until the website completed loading all the images. I just wanted to review if there is any improvements for the code. ...
3
votes
2answers
61 views

Show/hide for multiple IDs

I'm don't know much about javascript, but and slowly learning through using other people's code. The below code I'm using is quite repetitive, with the only variance being the ID names. I feel like ...
2
votes
1answer
65 views

jQuery: Scrolling down into a content

I got tasked to develop an accordion-like function for a webpage. The header will always be visible, while the main content (and footer) be styled as display: none;...
0
votes
2answers
66 views

Reload control using loop

I created this working sample and the code is below. Any advice on how to make this code; cleaner, more effective, just overall better! The data is coming from an API and I need to parse, select the ...
0
votes
0answers
18 views

Jquery selector - robustness of the syntax

I'm rather new to front-end & jquery selector. While what I am doing works, I'm unsure it's necessarily robust. FYI, the backend & templates are built on Django. The auto-naming conventions in ...
4
votes
1answer
51 views

HTML <ruby> elements word spacing using jQuery

I'm doing a hobby project for fun recently, it's a GitHub webpage using Jekyll. One of the main component of my site is displaying Chinese characters with their Sino-Vietnamese pronunciation. I use <...
0
votes
1answer
22 views

Check Three Dom Elements to See if they are empty or not and return detailed result

I am checking three elements on the DOM to see if they are empty or not so that I can run only the Ajax calls that I should run and save on overall bandwidth. The code works but it "smells bad&...
1
vote
1answer
73 views

Web-site navigation bar

I'm just starting to learn website coding with html, css, and JavaScript. To get a bit of a hang for it, I'm trying to build a complete web page. So far, I've only done the navbar. I started with a ...
0
votes
1answer
35 views

How can I have jQuery code further optimized?

I would like to see if my code below can still be optimized, resulting in lesser lines of code. My code retrieves the values from a multiselect field and assign them to hidden fields that will be ...
2
votes
0answers
24 views

Copy the reply button to each comment thread in WordPress. Converted from jQuery to JavaScript

I converted an old Wordpress Plugin of mine from jQuery to plain JavaScript using a cheat sheet. I was very surprised that it seems to work right out of the box on my first try. ...
0
votes
1answer
79 views

Selecting multiple checkboxes to show similar but different boxes

I have 3 checkbox's with 8 different combinations and outcomes. Selecting no checkboxes shows no divs. Selecting one checkbox shows the colored div. For example; clicking the red checkbox. Selecting ...
3
votes
1answer
130 views

Submitting form jQuery checkboxlist

In my requestForm submit function I have this logic that checks three checkboxes and then displays the label with an error message. Is there better logic? I would be happy for any kind of feedback ...
0
votes
0answers
123 views

Server-side processing data table best and secure code using ajax

I am using PHP and Server-side processing data tables. I have more than 30k records on my table and I have to display the records on my page when reload so I used the below code. Is this code is the ...
0
votes
2answers
29 views

Simple terminal style message logger

I have a short function written in JavaScript using jQuery which takes a message and appends it to a div. It does this one character at a time with a small delay between characters, and then returns ...
2
votes
1answer
25 views

Better way to work with clickable regions of window

The Goal Basically, what I'm looking for is the ability to click a region below an image to trigger a click() event which will scroll the window to the following ...
3
votes
2answers
53 views

JavaScript function that reuses a modal for adding, deleting, and viewing an item

I have a table that has buttons per row that makes views/edit an item in a modal and they have a layout like so: ...
2
votes
1answer
59 views

Reusable function for a validation process

I previously asked how can I simplify a validation process: How can I simplify this JQuery validation process? But in hindsight, what I really meant to ask was how can I turn that process into a ...
2
votes
0answers
91 views

Responsive snake game

Snake Snake first appeared in the 1970s. Since then it has become a video game classic that is pre-installed on many systems. The rules are simple: Food (often an apple) appears randomly on the grid. ...
2
votes
1answer
31 views

Is there a way to consolidate Ajax dropdowns that filters data from MYSQLi database

I recently started a project which has a database of rail cars for a train simulator. Im trying to set up a way to filter the data based upon 4 categories "Car Type", "Road Name", &...
2
votes
1answer
64 views

clone of HTML tables of data

Need help to refactor this code to look like its done by a pro. Or just put some advice or links to useful stuff. The idea is to clone a div with two empty tables for two separate arrays of data. div ...
4
votes
1answer
75 views

my code is messy and wasteful of lines, how do I make my code simple

can this script be made simpler? I'm just learning about javascript, so I don't really know which syntax to use. My HTML I have several id consisting of "doc1, doc2, doc3, .." and there is ...
3
votes
1answer
416 views

Iterate through multiple elements with different IDs in jQuery

I'm very new to jQuery and I managed to make this code work but I'm pretty sure that it could be made in a more efficient way. For example, it should be a way to send the id as a parameter instead of ...
5
votes
1answer
75 views

Children's Mini Game Handy-Eye Coordination

This is a game for children 3years+ to learn Hand-Eye Coordination with Mouse Movement. Goal is to catch all dinosaurs in the jungle, get the egg reward and then repeat the game. I tried to add sounds ...
3
votes
2answers
107 views

Wordpress Ajax Custom Query - High CPU LOAD

I'm developing a fully AJAX community WP theme that comes with a lot of custom queries. Everything is fine, there is no bug but recently but I had a few clients that have a huge database and my theme ...
4
votes
1answer
150 views

Javascript to show folder and files by calling Web Api

I have this Javascript which call the web api to see the available folder and then the available files. Any comment or code review on my code? ...
1
vote
1answer
36 views

Confirmation Model with jQuery

I have a link aimed to '/FridgeTemperatureRoute' and a checkbox. Purpose of the checkbox is to show the user whether the check has been done or not. ...
1
vote
1answer
28 views

Iterate through multiple elements based on their id in jQuery

Haven't worked too much with jQuery and I had to get the values from different elements (they have the ids 0, 1 and 2) in order to compute the sum of them and update a field with that value. The code ...
3
votes
2answers
63 views

How can I simplify these checkbox onClicks?

I know there is a way to simplify these checkbox onClick functions. I'm just not sure how to make it happen. Upon checking the checkAllProfiles checkbox, all of the profileCheckboxes are checked: <...
3
votes
0answers
44 views

Optimisation potential when using deferred/promises and looping

I am fairly inexperienced when it comes to jQuery/JavaScript, so although the following code works, I am just looking to understand if my use of looping, deferred/promises etc could be optimised at ...
3
votes
0answers
40 views

Validating a file input whose value is reset to empty string ("") after selection

My form comprises of a mandatory file input. The form is validated according to the jQuery validate plugin. The file input has attribute required so that the ...
4
votes
0answers
72 views

Created a paperfold like effect

I am trying to recreate a neat effect that I saw posted on Stack Overflow as a GIF . I am trying to recreate this with CSS and JavaScript and I have created a similar effect with a button press. I ...
3
votes
1answer
79 views

Node JS Express - Temperature records

Goal: I have thought of a project to create and came up with this goal of: "To record temperatures for different Fridges or Freezers." Current situation I have a working method to get data ...
1
vote
0answers
22 views

User Friendly Comment and Answer System for SharePoint Site

I am seeking help in improving my question and answer system I developed for my office SharePoint site. The question and answer system features two-columns and in the each columns is a table. I have a ...
2
votes
2answers
63 views

How can I simplify this JQuery validation process?

How can I simplify this functioning JQuery validation process: ...
2
votes
1answer
162 views

What is the best way to use serverside validation in PHP PDO?

I have a form on my page. I am using jQuery validation for client-side and PHP for server-side validation. I am using PDO. I don't have any issues with client-side and server-side validation. My form ...
3
votes
0answers
235 views

Dynamic dependent dropdown in jquery

I'm trying to create a dependent dynamic dropdown in jQuery, in which the number of dropdowns is not fixed. Let's say we've four provinces, each has cities, and each city has sections. Each section ...
3
votes
1answer
48 views

jQuery dropdown using each

Can someone please review the code and suggest any improvements / changes? Note that this method works but wanted to see if there is a better way for self learning purpose JavaScript/jQuery. Example ...
1
vote
0answers
117 views

Making Select2 pillbox control more accessible compliant and want feedback (bring your screen reader)

I am looking for feedback on screen reader improvements for the code/example below. The Select2 pillbox control needs to be more accessible. They have an open issues on this subject Select2 Issue ...
1
vote
1answer
41 views

Incrementing and decrementing 3 seperate input values by 1 using Javascript

I have written the following Javascript code which increments and decrements 3 separate inputs by 1: ...
2
votes
1answer
2k views

Javascript - Extract data from html table

I want to extract the headers data and column data (not row data) from an HTML table using JavaScript. Is this a good approach of doing it? And how can I simplify this using jQuery? ...
2
votes
1answer
27 views

How can I clean up (DRY) this verbose jQuery code?

I had posted this on StackOverflow — someone pointed me here. My code is working, but it's incredibly verbose and I know that it can be made more compact. I just don't know how :-) I'm building an ...

1
2 3 4 5
48