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
0 votes
0 answers
11 views

Find index of element within a list of elements with the same class

I have asked this question on stack overflow however I didn't receive an answer which solved the issue so I created one myself however I am wondering if there is a better/ simpler way to do it. Say I ...
user avatar
  • 163
0 votes
1 answer
19 views

Update button onclick using Jquery

I'm updating this onclick function and wanted to ask if this the best way to do this? ...
user avatar
  • 113
0 votes
0 answers
44 views

Clicking image makes select option changed, and vice-versa in jQuery

I'm using jQuery version 3.6, and I have image labels that are clickable and when the user clicks on it a select option is being selected. And vice-versa, when a user selects an option an image is ...
user avatar
1 vote
1 answer
42 views

Convert filter button from plain Javascript to Jquery

I have the following function written in JS: ...
user avatar
0 votes
0 answers
25 views

jquery method UpdateDisplay

I have method UpdateDisplay and base on the value coming back from the database I am going to hide/show different controls. The hasRangeIP and ...
user avatar
  • 113
0 votes
0 answers
24 views

jQuery building select control

I have this logic that I wanted to see if there is any better way to build this select control. I am using the includes to look for data in the array and then I ...
user avatar
  • 113
0 votes
0 answers
32 views

Differentiating all the numbers in an array with color codes

Here is a working code for differentiating all the numbers with color codes on an HTML page. How could this code be optimized by using built-In techniques or making use of ECMA Scripts? So that the ...
user avatar
0 votes
1 answer
74 views

Upgrade security and code quality of a website contact form

I have a simple website contact form created back in 2017. The form was developed using PHP, PHPMailer, jQuery, HTML and CSS. I would like to make sure the code is up to modern standards and secure. I ...
user avatar
2 votes
2 answers
94 views

Javascript convert number string to Boolean

I'm making this control toggle between hide and show base on the value in this hidden value. I wanted to use a Boolean because I ...
user avatar
3 votes
1 answer
112 views

Javascript array from IP address

I want to make this code better. It works now but I think it can be better. I have a working sample on jsfiddle. When the page loads I have the End IP Address disable until the data is entered. Then I ...
user avatar
0 votes
0 answers
52 views

Simple full page multi-step form. (Minus the form) using jQuery

I've tried my hand at creating a simple multistep system for a form. I used this CodePen as a base. I'm not too Jquery savvy so I'm thinking there could be smarter ways to accomplish what I have done, ...
user avatar
  • 111
4 votes
1 answer
45 views

Four HTML tabs elements, with fade animations, activated by buttons

I am pretty new to Javascript and trying to make a really simple tabs element which is just hiding and showing sections depending on which button is clicked. I know that this is a terrible way of ...
user avatar
1 vote
0 answers
35 views

A simple recipe page in HTML, SASS and JS

I've been learning how to design responsive webpages. I got done the basics and can create code that closely resembles the design, but I was wondering what are the best practices in web development ...
user avatar
  • 111
1 vote
0 answers
62 views

Split columns moving in the opposite direction when scrolled - in a continuous loop

I've seen something similar and have been trying to refactor the JS. I have two columns of content, which when scrolled move in opposite directions. This should also loop continuously. The ...
user avatar
  • 11
0 votes
0 answers
37 views

jquery function updated from javascript

This is original Code ...
user avatar
  • 1
2 votes
2 answers
68 views

JS Menu Post Get method

I have this JS ajax GET that returns menus to be used in a view. I wanted to see if there is any more way to write this method. Its a lot of code and just wanted to make sure there is no better way to ...
user avatar
  • 521
3 votes
2 answers
280 views

PHP blogging application with AJAX loading

I have been working on an online newspaper/blogging application with CodeIgniter 3.1.8 and Twitter Bootstrap 4. The latest feature added is lazy loading of posts. From the Static_model (...
user avatar
1 vote
1 answer
19 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. ...
user avatar
  • 147
0 votes
1 answer
88 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 ...
user avatar
2 votes
0 answers
47 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 ...
user avatar
1 vote
0 answers
16 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. ...
user avatar
  • 111
0 votes
0 answers
19 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 ...
user avatar
  • 101
0 votes
0 answers
24 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 ...
user avatar
0 votes
1 answer
77 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 ...
user avatar
  • 7,586
1 vote
0 answers
40 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 ...
user avatar
2 votes
0 answers
37 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. ...
user avatar
3 votes
2 answers
153 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 ...
user avatar
2 votes
1 answer
81 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;...
user avatar
  • 123
0 votes
2 answers
67 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 ...
user avatar
  • 521
0 votes
0 answers
19 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 ...
user avatar
  • 178
4 votes
1 answer
55 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 <...
user avatar
0 votes
1 answer
23 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&...
user avatar
1 vote
1 answer
75 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 ...
user avatar
0 votes
1 answer
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 ...
user avatar
2 votes
0 answers
33 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. ...
user avatar
  • 121
1 vote
1 answer
93 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 ...
user avatar
  • 21
3 votes
1 answer
146 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 ...
user avatar
  • 113
0 votes
2 answers
34 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 ...
user avatar
2 votes
1 answer
26 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 ...
user avatar
  • 21
3 votes
2 answers
55 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: ...
user avatar
  • 197
2 votes
1 answer
89 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 ...
user avatar
2 votes
0 answers
123 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. ...
user avatar
2 votes
1 answer
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", &...
user avatar
  • 121
2 votes
1 answer
83 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 ...
user avatar
  • 21
3 votes
1 answer
79 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 ...
user avatar
3 votes
1 answer
685 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 ...
user avatar
  • 159
5 votes
1 answer
84 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 ...
user avatar
3 votes
2 answers
117 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 ...
user avatar
4 votes
1 answer
233 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? ...
user avatar
1 vote
1 answer
40 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. ...
user avatar
  • 53

1
2 3 4 5
49