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
2 answers
139 views

Rubik's cube scrambler with timer and list of solves

This is a work in progress Rubik's Cube scramble generator with timer and list of solves. The list of solves is stored using localstorage so that it stays on page reload. A solve can also be deleted ...
HTMLNerd_1's user avatar
0 votes
0 answers
70 views

Html and CSS editor that runs and saves code

I decided to create this project to put my JS skills to the test mostly, and it works well. It is a HTML and CSS editor that saves your code to localstorage and ...
HTMLNerd_1's user avatar
2 votes
1 answer
68 views

Reorganice (and style) form's output in HTML using JQuery: how to do it better?

To clarify: The code in "What I achieved" is working. I'm looking for suggestions so I can improve. I'm quite new with JQuery (and javascript) and I've been learning while styling a forum. ...
Lucas's user avatar
  • 21
1 vote
2 answers
75 views

Changing every link on page, in fastest way possible

I have created a script (mediawiki gadget), which iterates over every redlink in a rendered wiki-page (that is, over every href with class new, signifying an ...
philo math's user avatar
0 votes
2 answers
155 views

jQuery + PHP Form Submit and Refresh

Code below successfully processes and submits data to database. Is there anything else that needs to be included / considered? PHP (note-process.php): ...
Matt's user avatar
  • 9
0 votes
1 answer
124 views

Generate HTML from input fields

I am building a small tool to generate a copy and paste HTML block, based on the user inputs. In the HTML file, I have all my inputs (select, checkbox, text inputs etc). I based myself on the JS of an ...
blogob's user avatar
  • 101
1 vote
0 answers
46 views

Display tags on the page coming from the server

There is a site with posts that have tags. The site has a search for these tags, that is, you enter words / letters separated by a space and tags are displayed for you by matches. These tags can be ...
gglin's user avatar
  • 11
1 vote
1 answer
129 views

Sign Up Page - A mini Frontend Project

I have designed a a small frontend project, a sign-up page. It uses HTML, CSS, JavaScript and jQuery. Being a beginner to frontend development, I want to adapt to all the best practices. I am looking ...
Ultimate's user avatar
  • 133
2 votes
2 answers
767 views

Clone Div and change input control

I am using keypress to get all the events of a input control. Once the user hits the enter button after I am then clone a div and update the ids. One project I am having is that I only want to do this ...
Jefferson's user avatar
  • 361
1 vote
0 answers
537 views

Select product variations using buttons/swatches instead of a dropdown

In WooCommerce, by default interface, selecting product variations is possible through a dropdown. But, I am developing a site where I wanted buttons/swatches instead of the dropdown. I achieved that ...
Chotu Kaalia's user avatar
0 votes
2 answers
2k views

JQuery fixed header that hides on scroll down and shows on scroll up

I am currently working on a site product where I have to create a site-header that is always fixed on top of the viewport but when I scroll down it hides, and again when I scroll up, it becomes ...
Chotu Kaalia's user avatar
1 vote
1 answer
225 views

Chrome bookmarklet to expand examples elements on a dictionary webpage

I created the following Chrome bookmarklet to open all elements with text Extra Examples boxes on this page. For example - the element labeled with text Extra Examples below can be clicked: When it ...
Mori's user avatar
  • 95
2 votes
1 answer
161 views

Building HTML in JS and append

I am working on this project where I need to building html from this object. There a a lot of loops and counter and wanted to see if there is a better way to do this Any suggestions/comments are ...
Jefferson's user avatar
  • 361
0 votes
1 answer
349 views

Using localStorage to set and get values for date fields

My input fields for the dates are not saved when the User presses the submit button. The page reloads and the values for the input fields are empty. So I'm using localStorage to save the values when ...
JThao's user avatar
  • 37
0 votes
1 answer
343 views

Calculate multiple form field values as you type

I'm making a down payment form where the user enters a purchase price and can then enter the amount they want to pay as a down payment as either a dollar amount, a percent down or by using a range ...
Junky's user avatar
  • 163
0 votes
1 answer
83 views

Build JS object that will be pass into the Handler [closed]

I am working on a web page where I am creating a JS object using {} and []. This object is passed into a handler. I wanted to see if there is a better way to create the object in JavaScript My logic ...
Jefferson's user avatar
  • 361
2 votes
1 answer
658 views

jQuery code to add / remove classes depending on the button clicked

What the code does What the JQuery code does is add / remove classes on div's elsewhere on the page, depending on the button clicked. Button 1 clicked → add class ...
Tristan's user avatar
  • 21
2 votes
1 answer
170 views

Creating object in JS that is passed into IHttpHandler

I am working on a web page where I am creating a JS object using {} and []. This object is passed into a handler I wanted to ...
Jefferson's user avatar
  • 361
3 votes
1 answer
424 views

SetTimeout to populate Javascript Object while a function looped AJAX requests to get data

I wrote some code that will get the name and data of a node or multiple of nodes and put them in an object (seriesData) so I can use said object for a chart (renderChart). I used setTimeout() so ...
Bewarden's user avatar
4 votes
1 answer
411 views

Setting all hidden fields based on id

I am working on a web page where there is a checkbox with a value and a hidden field. I want to ask your opinion on whether this logic is sound. My logic The checkbox has a value that matches the id ...
Jefferson's user avatar
  • 361
2 votes
2 answers
217 views

validating form before uploading files

This function below return true/false. How I could possibly improve the code quality? ...
Jefferson's user avatar
  • 361
0 votes
1 answer
58 views

Show/hide depending on ID and Class

I have written some code that shows a div class, based on what ID is clicked. I'm a beginner, so not sure how to make this code compact, it seems way too long at the moment. Can anyone suggest a ...
Liv Strawbridge's user avatar
0 votes
0 answers
476 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 ...
JamesS's user avatar
  • 163
0 votes
0 answers
456 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 ...
Jeroen Steen's user avatar
1 vote
1 answer
65 views

Convert filter button from plain Javascript to Jquery

I have the following function written in JS: ...
evilgenious448's user avatar
0 votes
1 answer
49 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 ...
Jefferson's user avatar
  • 123
0 votes
1 answer
151 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 ...
Michael Benjamin's user avatar
2 votes
2 answers
105 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 ...
Jefferson's user avatar
3 votes
1 answer
324 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 ...
Jefferson's user avatar
4 votes
1 answer
82 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 ...
RobDeadFreight's user avatar
2 votes
0 answers
73 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 ...
smanna's user avatar
  • 121
1 vote
0 answers
180 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 ...
Stephen's user avatar
  • 11
-1 votes
0 answers
40 views

jquery function updated from javascript

This is original Code ...
Notion's user avatar
  • 1
2 votes
2 answers
80 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 ...
Jefferson's user avatar
  • 361
3 votes
2 answers
318 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 (...
Razvan Zamfir's user avatar
1 vote
1 answer
28 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. ...
StealthRT's user avatar
  • 147
0 votes
1 answer
175 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 ...
Hooman Bahreini's user avatar
2 votes
0 answers
71 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 ...
jawncopper's user avatar
1 vote
0 answers
89 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. ...
Lewis's user avatar
  • 111
0 votes
1 answer
242 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 ...
mickmackusa's user avatar
  • 8,614
1 vote
0 answers
129 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 ...
pnuttbutterking's user avatar
3 votes
0 answers
86 views

Splash screen library in jQuery

I have created a splash screen library in jQuery. The splash screen will display until the website has completed loading all the images. I just wanted to review if there are any improvements. Here is ...
Ghost's user avatar
  • 185
3 votes
2 answers
1k 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 ...
Liv Strawbridge's user avatar
2 votes
1 answer
196 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;...
Omar's user avatar
  • 123
0 votes
2 answers
100 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 ...
Jefferson's user avatar
  • 361
4 votes
1 answer
110 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 <...
simplyPTA's user avatar
  • 191
0 votes
1 answer
26 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&...
Tyler Lazenby's user avatar
1 vote
1 answer
88 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 ...
AlexanderSplat's user avatar
0 votes
1 answer
37 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 ...
CodeForGood's user avatar
2 votes
0 answers
44 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. ...
Marc's user avatar
  • 121

1
2 3 4 5
48